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

瀏覽次數:10 次
跳到第一則未讀訊息

Kusalo

未讀,
2018年11月6日 下午4:19:552018/11/6
收件者: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):
$('.stdLink').add(p).click(S)[0];

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

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

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


回覆所有人
回覆作者
轉寄
0 則新訊息