• Resolved regnalf

    (@regnalf)


    I like FooBox because it integrates with my theme (pro) using class foobox where others don’t recognize the <a><img /></a> tag. And because it loads the images very fast.

    Unfortunately it doesn’t work when the page is still loading but the images are already clickable. Only when the page is fully loaded everything works as it should be.

    Is there a way that the script loads even earlier or something else that images are clickable only when the page load is complete?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author bradvin

    (@bradvin)

    hi @regnalf

    The “delay” is usually caused by the content of your page, which has to load. Unfortunately, the FooBox script only runs when it is loaded, which is sometimes after the page content, depending on where the script is loaded in the page. We always try to load it in the head which is as early as possible, but some speed optimizing plugins try to defer the loading or load it in the footer. If this happens, then it will load late after the content.

    If your site is image-heavy, you can also try to use lazy loading so that the images will not load on page load, but it really comes down to the content on your page and when (and how) the FooBox script is included.

    Having said all that, I will discuss this with @steveush, to see if there is a way to do this

    Thread Starter regnalf

    (@regnalf)

    Thanks for the explanation, I hope there is a possibility from your side.

    Plugin Author bradvin

    (@bradvin)

    @regnalf

    We have discussed this quite a bit, and it is almost impossible to do with javascript as the script will always run after the HTML has loaded, and if the HTML is large, there will always be a delay.

    Unless you have control over the HTML, there is no way to get around the problem unfortunately.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Lightbox not working while site is loading’ is closed to new replies.