EasyUI Forum

General Category => General Discussion => Topic started by: vicente on October 02, 2013, 11:15:39 PM



Title: hide menu
Post by: vicente on October 02, 2013, 11:15:39 PM
Hello Sir,

how are you?

i am creating a simple menu, in which once a user logon, he could see certain menus only. I can disable it, but i dont want them to have idea why some menu items are disabled. for this I need to hide menu items.

how can I do this in property of menu?



thank you



Title: Re: hide menu
Post by: mzeddd on October 03, 2013, 12:54:37 AM
Hi,

Try to use lines like this to hide/show menu items

<div id="myContextMenu" class="easyui-menu" style="width:140px;">
   <div onclick="doThis1();">Export</div>
   <div onclick="doThis2(');">Edit</div>
</div>

$($('#myContextMenu').menu('findItem','Edit').target).show();
$($('#myContextMenu').menu('findItem','Edit').target).hide();


Title: Re: hide menu
Post by: vicente on October 04, 2013, 11:54:30 PM
thank you so much sir, it works!