EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: jpierce on April 17, 2015, 01:15:59 PM



Title: set menu to hidden by default
Post by: jpierce on April 17, 2015, 01:15:59 PM
1.4 introduced hideItem to menus. Is there a data-option to set start the item out hidden to begin with?


Title: Re: set menu to hidden by default
Post by: jarry on April 17, 2015, 06:22:33 PM
To initialize a menu item width hidden style, just add 'display:none' style to its style attribute.
Code:
<div id="mm" class="easyui-menu" style="width:120px;">
<div style="display:none">Item1</div>
<div>Item2</div>
<div>Item3</div>
<div>Item4</div>
<div>Item5</div>
</div>