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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -