Execute function when closing jQuery Lightbox -
when clicking close lightbox, want action redirect users different url. how write that? work?
<!doctype html> <html> <body> $(“p”).click(function(){ // close lightbox url redirection $(this).( location ).attr("href", url); url = "put url here"; }); </body> </html>
you can using lightbox
's beforeclose event
. see following demo created you:
demo
all need following bit of jquery:
$('#clickme').featherlight('.inline', { beforeclose: function(event){ // if want open url in other tab: window.open("http://www.google.com"); } });
here, url opened in tab. if want open url in the same tab, use:
location.href = "http://www.google.com";
i hope helps out. luck!
Comments
Post a Comment