js摺疊菜單代碼

來源:互聯網
上載者:User
提示:您可以先修改部分代碼再運行

<div id="ItemCategories" class="CommonPanel"><script>function onTreeParentItemClicked(id){ if("Patro expl" == document.getElementById("TreeItem_" + id).className){ document.getElementById("TreeItem_" + id).className = "Patro pinch"; document.getElementById("TreeItemChild_" + id).style.display = "block"; } else{ document.getElementById("TreeItem_" + id).className = "Patro expl"; document.getElementById("TreeItemChild_" + id).style.display = "none"; }}</script><style type="text/css">ul.CommonPanelList li ul {display:none;} /*add by bility at 0808221028*/ul.CommonPanelList li {border:none;border-top:1px dashed #eee;padding:3px 0 3px 10px; overflow:hidden; }ul.CommonPanelList li.Patro{ background:none; border:none; padding-bottom:0;}ul.CommonPanelList li.Patro .pic{ background:none; padding:3px 0 3px 5px;width:170px;}ul.CommonPanelList li h4{padding:0; margin:0; line-height:16px; margin-left:-10px;border-top:1px dashed #eee; overflow:hidden; width:178px;}ul.CommonPanelList li.Allgoods h4{_margin:0;}ul.CommonPanelList li h4 a{display:block;padding:4px 0 2px 15px;}ul.CommonPanelList li.pinch h4 a{background:url(yun_qi_img/pinch.gif) 0 6px no-repeat;}ul.CommonPanelList li.expl h4 a{background:url(yun_qi_img/expl.gif) 0 6px no-repeat;}</style><div class="CommonPanelHeader"> <h3 class="CommonPanelTitle">店鋪類目</h3></div><div class=""> <ul id="CategoriesList" class="CommonPanelList"> <li class="Allgoods Patro expl"> <h4>所有寶貝</h4> </li> <li class="Patro expl" id="TreeItem_01"> <h4>javascript:onTreeParentItemClicked('01')">網路遊戲點卡專區</h4> <ul id="TreeItemChild_01"> <li>魔獸世界</li> <li>魔獸世界</li> <li>魔獸世界</li> <li>魔獸世界</li> <li>魔獸世界</li> <li>魔獸世界</li> </ul> </li> <li class="Patro expl" id="TreeItem_02"> <h4>javascript:onTreeParentItemClicked('02')">騰訊專區</h4> <ul id="TreeItemChild_02"> <li>魔獸世界</li> <li>魔獸世界</li> <li>魔獸世界</li> <li>魔獸世界</li> <li>魔獸世界</li> <li>魔獸世界</li> </ul> </li> <li class="Patro expl" id="TreeItem_03"> <h4>javascript:onTreeParentItemClicked('03')">手機儲值專區</h4> <ul id="TreeItemChild_03"> <li>魔獸世界</li> <li>魔獸世界</li> <li>魔獸世界</li> <li>魔獸世界</li> <li>魔獸世界</li> <li>魔獸世界</li> </ul></li> </ul></div>
提示:您可以先修改部分代碼再運行

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.