ベースとなるサンプル
jQuery UI - Accordion
http://jqueryui.com/accordion/
function AddItem() { // 新しく追加するアイテム var item = 'New section
'; // accordion 取得 var accordion = $( "#accordion" ).accordion(); // アイテムを追加して、一旦 accordion を破棄 accordion.append(item); accordion.accordion('destroy'); // accordion を再生成 accordion.accordion( { collapsible: true }); }Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
- List item one
- List item two
- List item three
今回はここのポストを参考にしました(*´ω`)
Adding items to accordion/losing CSS
http://forum.jquery.com/topic/adding-items-to-accordion-losing-css
0 件のコメント:
コメントを投稿