admin嵌套在spring mvc项目里,菜单栏点击新连接每次都会重置

<ul class="treeview-menu" id="ul_schedule">
                                <li><a href="#" onclick="return LoadPage(this)" data-url="/Schedule/Schedule/Index"><i class="fa fa-angle-double-right"></i> <span>今日排班</span></a></li>
                                <li><a href="#" onclick="return LoadPage(this)" data-url="/Schedule/Schedule/History"><i class="fa fa-angle-double-right"></i> <span>历史排班</span></a></li>
</ul>
function LoadPage(obj) {
    $.get($(obj).attr('data-url') + "?n=" + Math.random()).done(function (html) {
        $("#main_container").html(html);
        $("#nav2").text(" > " + $(obj).find('span').text());
        $("#nav1").text($(obj).parent().parent().prev().find('span').text());
    });

  return false;

}

 

posted @ 2015-10-12 09:40  星辰之力  阅读(369)  评论(0编辑  收藏  举报