當前位置:首頁 > 資訊 > info6 > 正文

js實現頁面跳轉菜單選中

發表于: 2015-10-08   作者:chelsi916   來源:轉載   瀏覽:
摘要: KeepAccounts/initializeShiftMahjong"> images/iconfont-jizhang.png"alt=""/> 收銀記賬 member/view/list"> images/iconfont-huiyuanyingxiao.png"alt=""/> 會員營銷 hairstyleDesign/view/toHairstyleDesig
<div class="headerpanel">
    <div class="headerlist">
        <ul>
            <li class="active" role="cashierMenu">
                <a href="<%=topBasePath %>KeepAccounts/initializeShiftMahjong">
                    <div class="img-wrap">
                        <img src="<%=topBasePath %>images/iconfont-jizhang.png" alt=""/>
                    </div>
                    <div>收銀記賬</div>
                </a>
            </li>
            <li role="membersMenu">
                <a href="<%=topBasePath %>member/view/list">
                    <div class="img-wrap">
                        <img src="<%=topBasePath %>images/iconfont-huiyuanyingxiao.png" alt=""/>
                    </div>
                    <div>會員營銷</div>
                </a>
            </li>
            <li role="priceSetMenu">
                <a href="<%=topBasePath %>hairstyleDesign/view/toHairstyleDesign">
                    <div class="img-wrap">
                        <img src="<%=topBasePath %>images/iconfont-jiageshezhi.png" alt=""/>
                    </div>
                    <div>服務設置</div>
                </a>
            </li>
            <li role="employeeMenu">
                <a href="<%=topBasePath %>position/view/positioninfo">
                    <div class="img-wrap">
                        <img src="<%=topBasePath %>images/iconfont-yuangongshezhi.png" alt=""/>
                    </div>
                    <div>員工設置</div>
                </a>
            </li>
            <li role="wechatMenu">
                <a href="<%=topBasePath %>artic/manager">
                    <div class="img-wrap">
                        <img src="<%=topBasePath %>images/iconfont-weimeituoke.png" alt=""/>
                    </div>
                    <div>微美拓客</div>
                </a>
            </li>
            <li role="financialMenu">
                <a href="<%=topBasePath %>">
                    <div class="img-wrap">
                        <img src="<%=topBasePath %>images/iconfont-zhinengbaobiao.png" alt=""/>
                    </div>
                    <div>智能報表</div>
                </a>
            </li>
            <li role="settingMenu">
                <a href="<%=topBasePath %>">
                    <div class="img-wrap">
                        <img src="<%=topBasePath %>images/iconfont-caiwufenxi.png" alt=""/>
                    </div>
                    <div>系統設置</div>
                </a>
            </li>
        </ul>
        <div class="user-info">
            <a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="/page.html">Hi, 歐陽利好! <b class="caret"></b></a>
        </div>
    </div>
</div>

<div class="leftpanel">
    <div class="logo-wrap">
        <img src="<%=menuBasePath %>images/logo.png" alt=""/>
    </div>
    <div class="leftmenu">
         <!-- 服務設置模塊 -->
	    <ul class="nav nav-tabs nav-stacked" role="priceSetMenu">
	        <img src="<%=menuBasePath %>images/left-active.png" alt="" class="left-active-img"/>
	        <li class="active" name="toHairstyleDesign" >
	            <a href="<%=menuBasePath %>hairstyleDesign/view/toHairstyleDesign">
	                <div class="img-wrap">
	                    <i class="iconfont icon-xiangmu left-icon"></i>
	                </div>
	                發型設置
	            </a>
	        </li>
	        <img src="<%=menuBasePath %>images/left-active.png" alt="" class="left-active-img hide"/>
	        <li name="projectList" >
	            <a href="<%=menuBasePath %>project/view/projectList">
	                <div class="img-wrap">
	                    <i class="iconfont icon-xiangmu left-icon"></i>
	                </div>
	                項目設置
	            </a>
	        </li>
	        <img src="<%=menuBasePath %>images/left-active.png" alt="" class="left-active-img hide"/>
	        <li name="comboInfoList" >
	            <a href="<%=menuBasePath %>comboInfo/view/comboInfoList">
	                <div class="img-wrap">
	                    <i class="iconfont icon-huli2 left-icon"></i>
	                </div>
	                套餐設置
	            </a>
	        </li>
	        <img src="<%=menuBasePath %>images/left-active.png" alt="" class="left-active-img hide"/>
	        <li name="goodsInfoList" >
	            <a href="<%=menuBasePath %>goodsInfo/view/goodsInfoList">
	                <div class="img-wrap">
	                    <i class="iconfont icon-shangpin-XS left-icon"></i>
	                </div>
	                商品設置
	            </a>
	        </li>
	        <img src="<%=menuBasePath %>images/left-active.png" alt="" class="left-active-img hide"/>
	        <li name="goodsStockList" >
	            <a href="<%=menuBasePath %>goodsInfo/view/goodsStockList">
	                <div class="img-wrap">
	                    <i class="iconfont icon-shangpin-XS left-icon"></i>
	                </div>
	                商品庫存
	            </a>
	        </li>
	        <img src="<%=menuBasePath %>images/left-active.png" alt="" class="left-active-img hide"/>
	        <li name="supplierInfoList" >
	            <a href="<%=menuBasePath %>supplierInfo/view/supplierInfoList">
	                <div class="left-content">
	                    <div class="img-wrap">
	                        <i class="iconfont icon-gongyingshang-GL left-icon"></i>
	                    </div>
	                    供應商管理
	                </div>
	            </a>
	        </li>
	    </ul>
    </div>
</div>

<script type="text/javascript">
jQuery(document).ready(function(){
	initMenu();
});

function initMenu(){
	var url = window.location.href;
	jQuery('.left-active-img').addClass('hide');//隱藏其他菜單
	var curLi = jQuery("a[href='" + url + "']").parent();
	curLi.addClass('active').siblings('li').removeClass('active');
	
	var curImg = curLi.prev();
	curImg.removeClass('hide').siblings('img').addClass('hide');
	var curUl = curImg.parent();
	curUl.removeClass('hide').siblings('ul').addClass('hide');;//顯示當前地址的菜單
	
	jQuery('.headerlist li').removeClass('active');
	jQuery("li[role='" + curUl.attr('role') + "']").addClass('active');
}
</script>

js實現頁面跳轉菜單選中

版權所有 IT知識庫 CopyRight ? 2009-2015 IT知識庫 IT610.com , All Rights Reserved. 京ICP備09083238號
广东25选5开奖结果