Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #1330292

    I would like to reload parent page after closing lightbox window.
    How can I do ?
    Kind regards


    Hey Jorge,

    Thank you for the inquiry.

    That option is not available by default but it can done using a custom script. Why do you have to reload the page?

    This is an example of the script that reloads the page after clicking the lightbox close button (mfp-close).

    // reload the page on lightbox close
    function ava_custom_script(){
    	(function($) {
    		$(document).ready(function() {
    			$(".avia_image").on("click", function() {
    				setTimeout(function() {
    					$(".mfp-wrap").on("click", function(e) {
    						var target = e.target;
    						if(target.classList.contains("mfp-close")) {
    				}, 500);
    add_action('wp_footer', 'ava_custom_script');

    Best regards,


    Hey Ismael,
    First, I would like to thank you for your response.
    My purpose is to allow users to update each textbox existing on a page. User can update each textbox with a WPUF form profile displayed in a lightbox. So when a user updates a textbox, i have to refresh parent page after closing lightbox to display updated data.
    Just to let you, I copy/paste your script and nothing happens. I put some ‘echo’ and no trace ;-)
    Kind regards



    Thank you for the clarification.

    Where can we check the page? Please provide the URL in the private field. You may need to purge the cache and remove the browser history before checking the page. Also, please note that the script will only work when you actually click the close (x) button.

    Best regards,


    Hi Ismael,
    Please find in the private field all technical informations.
    Many thanks for your help.
    King regards

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.