I'm in direct need of assistance with getting my sites Quick Launch Current Navigation collapsible/accordion. I've tried almost all the preferred code on the web with no success.

I'm unable to find a proper code that would enable this feature.

Code:

<script src="/sites/g1/Scripts/jquery%20Codes/jquery-1.11.4.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $("div.menu-vertical>ul.root>li.static>a").toggle(function() {
            $(">ul", $(this).parent()).show("fast");
        }, function() {
            $(">ul", $(this).parent()).hide("fast");
        });
        $("div.menu-vertical>ul.root>li.static>ul.static").css("display", "none");
        var s = $("div.menu-vertical>ul.root>li.static>ul.static>li.selected").parent();
        var p = s.parent();
        p.find('ul').css("display", "");
    });
</script>
有帮助吗?

解决方案

Try this code I guess it might work.

$(document).ready(function(){ $(".s4-ql ul.root ul").hide(); $(".s4-ql ul.root > li ").mouseover( function() { $(".s4-ql ul.root ul").hide(); $(this).children(".s4-ql ul.root > li > ul").slideDown("slow"); } ); });
许可以下: CC-BY-SA归因
scroll top