私はJQueryアコーディオンを使用していますが、それはうまく動作し、正常に終了します....しかし、アコーディオンサブメニューを追加したいと思います。JQueryアコーディオンサブメニュー/ネストされていない
マイライブラリは:折りたたみ式のdivあまりに
<p><a href="#">TEST MAIN MENU</a></p>
<div>
<h3><a href="#">Sub header</a></h3>
<div>sub content here</div>
</div>
and "Sub header" is not styled as a header nor it wraps up the div below it like "TEST MAIN MENU" does...
On the <head> I have this:
<script>
$(function() {
$("#accordion").accordion({
active: false,
autoHeight: false,
collapsible: true,
alwaysOpen: false
});
});
function collapseAll() {
$("#accordion")
.filter(":has(.ui-state-active)")
.accordion("activate", -1);
$(".ui-accordion-header").blur();
}
</script>
All I need is to make "<h3><a href="#">Sub header</a></h3>"
:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="http://code.jquery.com/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/start/jquery-ui.css" type="text/css" rel="Stylesheet" />
私はこのテストを追加しました。
この回答には2つの質問が含まれています。なぜあなたはサブメニューを持つことができないと言いますか?正当化してください。 –
も1つの答え – Richard
さて、このhttp://jsfiddle.net/qdSu5/ –