:::
XOOPS使用討論區

xoops中如何加入jquery tools tab功能

discuss pic 2013-06-26 17:51:36

老師您好,最近發現了一個網站[url=http://jquerytools.org/]flowplayer[/url],裡面有提供jquery tools免費使用,其中的tab功能剛好很有興趣想要研究如何使用,可是我用tad老師的tad theme測試,結果css部分ok了,可是js功能卻無法使用,以下是我修改後的程式碼,後來發現xoops本身也有內建tabs.jquery.tools.min.js,想請問我的程式碼有錯誤,還是甚麼原因造成js沒有作用呢??紅色字部分是我修改加入的部分,請老師有空幫忙看看,感激不盡。另外,我可以不在佈景中使用這個js,而在區塊中使用嗎??

我目前使用的xoops 是2.5.4版

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">

<head>

        <!-- Assign Theme name -->

        <{assign var=theme_name value=$xoTheme->folderName}>

 

        <!-- Title and meta -->

    <meta http-equiv="content-language" content="<{$xoops_langcode}>" />

    <meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />

        <title><{$xoops_sitename}><{if $xoops_pagetitle !=''}> - <{$xoops_pagetitle}><{/if}></title>

        <meta name="robots" content="<{$xoops_meta_robots}>" />

        <meta name="keywords" content="<{$xoops_meta_keywords}>" />

        <meta name="description" content="<{$xoops_meta_description}>" />

        <meta name="rating" content="<{$xoops_meta_rating}>" />

        <meta name="author" content="<{$xoops_meta_author}>" />

        <meta name="copyright" content="<{$xoops_meta_copyright}>" />

        <meta name="generator" content="XOOPS" />

 

        <!-- Rss -->

        <link rel="alternate" type="application/rss+xml" title="" href="<{xoAppUrl backend.php}>" />

 

        <!-- Favicon -->

        <link rel="shortcut icon" type="image/ico" href="<{xoAppUrl favicon.ico}>" />

 

    <!-- Sheet Css -->

        <link rel="stylesheet" type="text/css" media="all" title="Style sheet" href="<{xoAppUrl xoops.css}>" />

        <link rel="stylesheet" type="text/css" media="all" title="Style sheet" href="<{xoImgUrl style.css}>" />

<link rel="stylesheet" type="text/css" media="all" title="Style sheet" href="<{xoImgUrl css/tabs-no-images.css}>" />

    <link rel="stylesheet" type="text/css" media="all" title="Style sheet" href="<{xoImgUrl css/standalone.css}>" />

    <{php}>

global $xoTheme;

$xoTheme->addScript('browse.php?Frameworks/jQuery/jQuery.js');

$xoTheme->addScript('js/jquery.tools.min.js');

$header = empty($GLOBALS['xoopsOption']['xoops_module_header']) ?

$this->get_template_vars('xoops_module_header') :

$GLOBALS['xoopsOption']['xoops_module_header'];

$this->assign('xoops_module_header', $xoTheme->renderMetas(null, true) . $header);

<{/php}>

<{$xoops_module_header}>

   

    <!-- customized header contents -->

        <{$xoops_module_header}>

     

</head>

<body>

 

  <{if $xoBlocks.canvas_left and $xoBlocks.canvas_right}>

<{assign var=columns_layout value='dreispalten-layout'}>

<{elseif $xoBlocks.canvas_left}>

<{assign var=columns_layout value='zweispalten-layout'}>

<{elseif $xoBlocks.canvas_right}>

<{assign var=columns_layout value='zweispalten-layout'}>

<{else}>

<{assign var=columns_layout value='row'}>

<{/if}>

 

<table align="center" cellspacing="0" cellpadding="0" id="content_all">

 

 <tr><td id="content_head">

<div id="banner" class="banner">

         <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="730" height="120">

        <param name="movie" value="http://192.168.0.199:199/html/images/banners/movecover.swf">

        <param name="quality" value="high">

        <param name="SCALE" value="exactfit" />

        <embed src="http://192.168.0.199:199/html/images/banners/movecover.swf" width="700" height="160" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" scale="exactfit"></embed>

      </object>

      </div>

      <div class="topmenu">

    <ul>

      <embed src="http://192.168.0.199:199/html/themes/tad_themes_01/images/title_button.swf" width="930" height="45" quality="high" scale="exactfit"> </embed>

          </ul>

  </div>

        </td></tr>

  <tr>

    <td id="content_main">

      <table width="1000px" border="0" cellspacing="0" cellpadding="0" id="content_tbl">

        <tr>

          <td width="180px" rowspan="5" id="block_l"><!--左區塊區-->

            <{foreach item=block from=$xoBlocks.canvas_left}>

            <{includeq file="$theme_name/block.html"}>

            <{/foreach}> <br /></td>

          <td width="300px" id="block_tcl"><!-- 上中左區塊 -->

            <{if $xoBlocks.page_topleft}>

            <{foreach item=block from=$xoBlocks.page_topleft}>

            <{includeq file="$theme_name/block_c.html"}>

            <{/foreach}> <{/if}></td>

          <td width="300px" id="block_tcr"><!-- 上中右區塊 -->

            <{if $xoBlocks.page_topright}>

            <{foreach item=block from=$xoBlocks.page_topright}>

            <{includeq file="$theme_name/block_c.html"}>

            <{/foreach}><{/if}> </td>

       <td width="180px" rowspan="5" id="block_r"><!--右區塊區-->

            <{foreach item=block from=$xoBlocks.canvas_right}>

            <{includeq file="$theme_name/block.html"}>

            <{/foreach}> </td>

        </tr>

        <tr>

          <td width =620px colspan="2" id="block_tc"><!-- 上中區塊 -->

             <{if $xoBlocks.page_topcenter}>

            <!-- CENTER -->

<!-- tabs -->

<ul class="css-tabs">

<li><a href="#">Tab 1</a></li>

<li><a href="#">Tab 2</a></li>

<li><a href="#">Tab 3</a></li>

</ul>

<!-- panes -->

<div class="css-panes">

<div>

Tab 1 Content

</div>

<div>

Tab 2 Content

</div>

<div>

Tab 3 Content

</div>

</div>

<{/if}> </td>

        </tr>

        <tr>

          <td id="block_bcl"><!-- 下中左區塊 -->

          <{if $xoBlocks.page_bottomleft}>

            <{foreach from=$xoBlocks.page_bottomleft item=block}>

            <{include file="$theme_name/block.html"}>

            <{/foreach}><{/if}></td>

          <td id="block_bcr"><!-- 下中右區塊 -->

          <{if $xoBlocks.page_bottomright}>

            <{foreach from=$xoBlocks.page_bottomright item=block}>

            <{include file="$theme_name/block.html"}>

            <{/foreach}><{/if}></td>

        </tr>

        <tr>

          <td colspan="2" id="block_bc"><!-- 下中區塊 -->

            <{if $xoBlocks.page_bottomcenter}>

            <{foreach from=$xoBlocks.page_bottomcenter item=block}>

            <{include file="$theme_name/block.html"}>

            <{/foreach}>

            <{/if}> </td>

        </tr>

        <tr>

          <td width =800px colspan="2" id="content"><!--主內容區-->

            <{$xoops_contents}> </td>

                 </tr> </table>

        <tr>

          <td id="content_foot"><!--頁尾區-->

            <{$xoops_footer}>        

        </tr>

       

<script type="text/javascript" >

// perform JavaScript after the document is scriptable.

$(function() {

        // setup ul.tabs to work as tabs for each div directly under div.panes

        $("ul.css-tabs").tabs("div.css-panes > div");

});

</script>

 

</body>

</html>


:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.net%2Fmodules%2Ftad_discuss%2Fdiscuss.php%3FBoardID%3D17%26DiscussID%3D3488

線上使用者

34人線上 (13人在瀏覽討論留言)

會員: 0

訪客: 34

更多…