0

有谁知道你什么时候在sharepoint中创建了站点设置导航中的导航结构/我只能在标题下添加一个页面并且必须隐藏作为标题的页面?

单击顶部菜单而不是立即显示时,如何使菜单折叠?

我想在单击任何第一个级别时显示第二个级别,然后单击第二个级别以使第一个消失,并显示第二个和第三个级别,并且面包屑可以轻松回家。

如何在门户网站中完成此操作而不使用发布站点?任何建议将不胜感激。

4

1 回答 1

0

Jquery是这样的:

<script type="text/javascript" src=http://yourMoss/sites/Shared%20Documents/jquery-x.x.x.js></script>
<script type="text/javascript">
$(function(){
//initialize menus
    var menuRows = $("[id$='QuickLaunchMenu'] > tbody > tr");
    var menuHd = menuRows.filter("[id!='']:has(+tr[id=''])");
    //set img path for when submenu is hidden
    var closedImg = "/_layouts/images/plus.gif";
    //set img path for when submenu is visible
    var openedImg = "/_layouts/images/minus.gif";
    var cssInit = {
        "background-image": "url('"+closedImg+"')",
        "background-repeat": "no-repeat",
        "background-position": "100% 50%"
    }
    var cssClosed = {"background-image": "url('"+closedImg+"')"}
    var cssOpen = {"background-image": "url('"+openedImg+"')"}
    //hide submenus
    menuRows.filter("[id='']").hide();
    //apply initial inline style to menu headers
    menuHd.find("td:last").css(cssInit);
    menuHd.click(function () { 
        var styleElm = $(this).find("td:last")
        var nextTR = $(this).next("tr[id='']");
        if (nextTR.is(':visible')) {
            nextTR.hide();
            styleElm.css(cssClosed);
        } else {
            nextTR.show();
            styleElm.css(cssOpen);
        }
    });
});
</script> 
于 2009-10-21T00:22:57.893 回答