0
我有這個函數可以在三個級別獲取類別。動態填充megamenu
- 一說得到
ParentCategories
- 一個由
ParentCategoryID
- 一個由
categoriesID
得到Subcategories
得到類別。
我想建立一個megamenu看起來像這樣的網站: http://www.potterybarn.com/
HTML標記
<div>
<asp:Repeater ID="HorizMenuRepeater" runat="server">
<HeaderTemplate>
<ul id="mega-menu"></HeaderTemplate>
<ItemTemplate>
<li><a id="mBox" href="javascript:;">'<%#Eval("ParentCatName")%>'</a></li></ItemTemplate>
<FooterTemplate></ul></FooterTemplate></asp:Repeater>
</div>
<script>
window.addEvent('domready', function() {
new mBox.Tooltip({
content: 'MegamenuUC',
setStyles: { content: { padding: 15, lineHeight: 20 } },
position: {
x: 'right',
y: 'bottom'
},
attach: 'mBox',
closeOnMouseleave: true
});
});
</script>
<div id="MegamenuUC" style="display:none">
<uc1:Megamenu ID="Megamenu1" runat="server" />
</div>
結果
的用戶控件的代碼
<ul>
<h3>Category</h3>
<ul>
<li><a href="#">Sub category</a></li>
</ul>
</ul>
我想動態地做到這一點,現在它只是動態的父類別。
我需要某種方式傳遞的ID就知道魔女上空盤旋,壽PAS正確的ID給我的功能得到類別parentcategory這樣我就可以填充我的用戶用它
感謝
馬貝使用了Ajax,我需要考績不回發的ID –