回复 39楼jackshih58的帖子
修改了代码,以满足选择的效果:
- if (!this.IsPostBack)
- {
- int itemIndex = 0;
- var menuId = ""#" + this.Panel2.ClientID + """;
- var script = "<script type="text/javascript">";
- script += "$(document).ready(function () {";
- script += "var menu = $(" + menuId + ").data("wijmo-wijmenu");";
- script += "menu._getSublist().children("li").eq(" + itemIndex + ").find("." + menu.options.wijCSS.wijmenuLink).trigger("click");";
- script += "menu._items[" + itemIndex + "]._displaySubmenu({ target: $(" + menuId + ").find("li a")[" + itemIndex + "] });";
- script += "});";
- script += "</script>";
- this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "showSubMenu", script);
- }
复制代码
但对于Mode=slide,没有办法去选择一项,还望知晓。 |