EasyUI Forum
September 15, 2025, 03:39:20 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: disable menubutton mouseover on: February 20, 2014, 01:07:18 AM
Get the menu binded to menubutton and you can do anything with this menu.
Code:
var opts = $('#mb').menubutton('options');  // the menubutton options
var m = $(opts.menu);  // the menu object
var item = m.menu('findItem', 'Copy');  // find the menu item
m.menu('disableItem', item.target);  // disable the specified menu item

How does 'findItem' work? what do I need to put in the 2nd parameter for it to find the right menu?
Is it possible to use 'findItem' by giving it an object that I have in my system that is attached to the menu item?
2  General Category / EasyUI for jQuery / Re: disable menubutton mouseover on: February 18, 2014, 07:46:55 AM
Please call 'disable' method to disable a menubutton component.
Code:
$('#mb').menubutton('disable');

this works for the main menubutton (the <a> element) but not for the menu(the <div> element)


EDIT: I found that 'menu' has the method 'disableItem' , but I can't use the method because the menus get attached to the <body> and I can't use the jquery $ selector to get the correct menu.

Do I have to give every menu an ID so that I can know which menu is which, or is there a way for me to create the menus without attaching them to the <body>?
3  General Category / EasyUI for jQuery / disable menubutton mouseover on: February 17, 2014, 08:18:03 AM
Is there a way for me to disable a menubutton so that when I put my mouse over it, it won't show the submenu?
or do i have to manually unbind the 'mouseover' event of the menubutton?

thank you
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!