Bookmarklets - Click event

149 Views Asked by At

I can't seem to figure out how to use a bookmarklet to link to a page and then trigger the pages lightbox image gallery. I am unfamiliar with this technique. Any assistance on the best way I can set up this bookmarklet?

1

There are 1 best solutions below

0
On BEST ANSWER

Bookmarklets aren't really links per se, if your bookmarklet navigates to a page it will cease processing at that point (so you won't be able to trigger the lightbox). If you are already on the page you want to trigger the lightbox (assuming the page is using this plugin) you could try using:

javascript:$('a[@rel*=lightbox]').eq(0).trigger('click');