Using JS to trigger an OverlayTrigger

Robust

Well-known member
What would I do to trigger an OverlayTrigger? For example if I want to open the quick navigation through JS, how do I trigger it?
 
Get element's jQuery object, call click() function
Code:
$('.breadBoxTop .jumpMenuTrigger').click();
 
There's also an example in XFMG media_add.js (I think) if you need something a bit dynamic where you don't necessarily have an OverlayTrigger.
 
Quick question @Arty @Chris D

.click() will click the item and you can't click off it or stop it being shown. I want it to behave like an overlay, you click somewhere else (off it) and it goes away.
 
It is normal overlay, just like any other overlay. It uses same code. There is no difference in behavior of display. click() function does the same as if you clicked link yourself.

So clicking somewhere else should hide overlay.
 
Top Bottom