Set a link in caption - then close slimbox on link-click

Skip to first unread message


Nov 6, 2018, 4:19:55 PM11/6/18
to Slimbox
It is easy enough to add the link html to the caption. I am using a class definition (.stdLink) - as opposed to: a href=

I am using ajax to load the linked-to page-data but can't work out how to close slimbox. The new data loads OK off the link but #lbOverlay and other elements remain. Clicking the overlay clears it but I am sure it is possible to remove all slimbox elements.

I have tried adding (in the minified version):

from the unmin code I tried:
            caption = $('<div id="lbCaption" />')[0],
            number = $('<div id="lbNumber" />')[0],
            $('<div style="clear: both;" />')[0];

I tried adding:
$(".stdLink").on("click", function(){

I suspect the solution is not hugely complicated but I just don't see it/
And suggestions would be appreciated.

Reply all
Reply to author
0 new messages