Trigger an overlay via javascript

Jake B.

Well-known member
I'm needing to trigger an overlay using javascript. Currently I have a button doing this using
Code:
<a href="{xen:link link}" class="OverlayTrigger">

However, I also need to be able to open it on a specific keypress, but am unable to find a usable function to open the overlay by passing the URL to it.

Perhaps @Mike could be of assistance, since I assume this was written by you.

Thanks,

Jake
 
This isn't totally right and will need some improvements but at a basic level:

Code:
$('.OverlayTrigger').click();

So if you can get a JS event to trigger that, that's the cheaty, hacky way.

For something more robust, look at what triggers the Create Album overlay to load on the Media Add form in the Gallery.
 
This isn't totally right and will need some improvements but at a basic level:

Code:
$('.OverlayTrigger').click();

So if you can get a JS event to trigger that, that's the cheaty, hacky way.

For something more robust, look at what triggers the Create Album overlay to load on the Media Add form in the Gallery.

That worked, thanks!
 
Top Bottom