Support » Plugin: Lightbox & Modal Popup WordPress Plugin - FooBox » FooBox reloads page when click on navigation buttons

  • Resolved spyrosf

    (@spyrosf)


    Hi,
    I am having an isuue with all the foo galleries when open with foo box. When pressing previous or next buttons the images starts to load and suddenly the whole page is reloaded. If I scroll right or left there is no problem.
    I am using the latest version, 2.7.16

    Thanks!

    • This topic was modified 4 months, 3 weeks ago by spyrosf.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support elviiso

    (@elviiso)

    Hi @spyrosf

    After looking into this issue for you, we realized that this issue is actually being caused by the theme that you are currently using. To be more specific, the issue is in this theme file https://www.photologio.gr/wp-content/themes/newline/js/custom.js?ver=1.0 from line 317 to 321.

    Let me explain to you what’s causing this in more detail.

    Here’s the code snippet that’s between those lines in that file:

    //Page Transition
    		$('a:not([target="_blank"]):not([href^="#"]):not([href*="?replytocom"]):not([href*="?add-to-cart"]):not([data-gal^="lightbox"]):not(.prettyphoto):not(.fg-thumb)').click(function(event){
    			event.preventDefault();
    			var linkLocation = this.href;
    			$(".loading").fadeIn($(".loading").attr('data-speed'), redirectPage(linkLocation));      
    		}); 

    The selector of the code above does not exclude Foobox’s buttons. So when they are clicked it attempts to redirect to the href, and when there is no href linke in this case, it eventually performs a window.location = "" which reloads the current page.

    The developer who wrote that custom JS needed to add the Foobox buttons into the excluded selector too. They could probably fix it by changing the selector to be:

    a[href]:not([target="_blank"]):not([href^="#"]):not([href*="?replytocom"]):not([href*="?add-to-cart"]):not([data-gal^="lightbox"]):not(.prettyphoto):not(.fg-thumb)

    instead of:
    a:not([target="_blank"]):not([href^="#"]):not([href*="?replytocom"]):not([href*="?add-to-cart"]):not([data-gal^="lightbox"]):not(.prettyphoto):not(.fg-thumb)

    Kindly get in touch with the theme developers regarding this issue and they will be able to implement the changes suggested or an alternative solution that should resolve this issue. Thanks in advance for doing so.

    Kind regards,
    Elvis

    • This reply was modified 4 months, 3 weeks ago by elviiso.
    Thread Starter spyrosf

    (@spyrosf)

    Thank you for the feedback, Elvis.
    The change has been implemented and worked!

    Truly appreciate it!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.