Using JS to trigger an OverlayTrigger

Robust

Well-known member
#1
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?
 

Chris D

XenForo developer
Staff member
#3
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.
 

Robust

Well-known member
#4
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.
 

Arty

Well-known member
#5
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