2009-08-29 6 views

答えて

0

私はjqueryプラグインを試していましたが、それは私の要求に合っていませんでした。

しかし、私は他のサイトからJSとCSSをコピーして、それが動作させることができています:

http://jstock.sourceforge.net/features.html

1

jQuery Accordionです。

あなたはそれを試してみる(jQueryのアコーディオンのページから)このコードを使用することができます:

ヘッド:

<script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script> 
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script> 
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.accordion.js"></script> 
<script type="text/javascript"> 
$(document).ready(function(){ 
$("#accordion").accordion(); 
}); 
</script> 

ボディ:jQueryのを使用して

<div id="accordion"> 
    <h3><a href="#">Section 1</a></h3> 
    <div>Mauris mauris ante</div> 
    <h3><a href="#">Section 2</a></h3> 
    <div>Sed non urna</div> 
    <h3><a href="#">Section 3</a></h3> 
    <div>Nam enim risus </div> 
    <h3><a href="#">Section 4</a></h3> 
    <div>Cras dictum</div> 
</div> 
1

、私はこのスクリプトを持っています私が使用している:

$(document).ready(function() { 
    $(".nav > li > a").click(function() { 
     $("ul", $(this).parent()).slideToggle("normal"); 
     return false; 
    }); 
    $(".nav ul").hide(); // Hide all on load. Done here rather than in CSS so users 
    // see the menu if they have javascript disabled. 
}); 

このメニューは、HTMLで次のようにマークアップされています。

<ul class="nav"> 
    <li><a href="#">Header</a></li> 
    <li> 
      <ul> 
       <li>Sub list Items</li> 
       <!-- More --> 
      </ul> 
    </li> 
</ul> 

各拡張セクション。

関連する問題