This content has been marked as final.
Show 3 replies
-
1. Re: Hiding a context menu
nbelaevski Jan 20, 2009 8:58 PM (in response to utdrew)Hello Drew,
Most likely the problem is caused by the fact that menu is not found by jQuery. Add:alert(jQuery('menu').length)
to check that or use debugger.
Correct id selector should start with #, so you should use jQuery('#menu'), but still there is a problem. As id is output including ids of parent forms etc., the valid code is:jQuery("\##{fn:replace(rich:clientId('menu'), ':', '\\:')}")
'fn:' prefix should be bound to http://java.sun.com/jsp/jstl/functions URI. -
2. Re: Hiding a context menu
utdrew Jan 21, 2009 3:17 PM (in response to utdrew)Thanks for your help!
I ended up using a rich:jquery to take care of the id problem. Now it works and hides the popup but the popup no longer shows up unless I call a similar 'show' method in the onexpand. Any ideas about that?
In order to work around the fact that the onmouseover event doesn't ever fire on the context menu I added it to every menuItem. Is it a known issue that the onmouseover doesn't work on the context menu? If so, it seems like the documentation should be updated.
Thanks,
Drew -
3. Re: Hiding a context menu
nbelaevski Jan 22, 2009 8:43 PM (in response to utdrew)Drew,
You've hidden menu element using hide() method for HTML element. Use JS API hide() method instead