Pro: closing a lightbox from a header button click

See this page
http://staging1.kidsmagicworld.com.au/birthday-magician-sydney-1-hour/

when you click the “birthday party info video” this brings up a lightbox video

under that you can see the header bottom bar with 3 links (I have set the zindex to appear above the lightbox)

is it possible to have that lightbox close when any of those buttons are clicked? and still do what they are supposed to do (such as the instant quote button - anchors to the form for example)

essentially simulating the clicking of the esc key and also linking to a different part of the page

Hi there,

Thank you for reaching out to us! Yes this can be done using custom scripting. First give your buttons a class close-lightbox-btn and then add the following code in the Theme Options > JS:

jQuery(document).ready(function($){
	$('.close-lightbox-btn').click(function(){
		$('.ilightbox-close').click();
	});
});

Don’t forget to clear all caches after adding the code. Let us know how this goes!

Perfect answer that works like a charm!!!

You’re more than welcome, glad we could help.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.