Sharepoint2010 サイトの QuickLaunchMenu を変更して、アコーディオン スタイルを使用しようとしています。
現在選択されているアイテムを取得するにはどうすればよいですか? 現在の (アクティブな) nav-item に css クラスを追加する可能性はありますか? 3 番目の階層レベルを追加するにはどうすればよいですか?
これは私のjQueryコードです:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#s4-leftpanel-content li.static>ul.static").each(function(){
$(this).hide();
});
$("#s4-leftpanel-content ul.root>li.static>a").click(function(ev){
//ev.preventDefault();
var child = $(this).parent().children('ul');
$("#s4-leftpanel-content li.static>ul.static").each(function(){
$(this).hide();
});
child.toggle();
});
//disable heading click
$("#s4-leftpanel-content ul.root>li.static>a").toggle(
function () {},
function () {}
);
});
</script>
これは私のクイック起動コントロールです:
<SharePoint:UIVersionedContent UIVersion="4" runat="server">
<ContentTemplate>
<SharePoint:AspMenu id="V4QuickLaunchMenu" runat="server" EnableViewState="false"
DataSourceId="QuickLaunchSiteMap"
UseSimpleRendering="true"
UseSeparateCss="false"
SelectStaticItemsOnly="true"
CustomSelectionEnabled="true"
Orientation="Vertical"
StaticDisplayLevels="3"
MaximumDynamicDisplayLevels="2"
SkipLinkText=""
CssClass="s4-ql">
</SharePoint:AspMenu>
</ContentTemplate>
</SharePoint:UIVersionedContent>
どんな助けでも大歓迎です。
ありがとう!