Support » Plugin: Easy FancyBox » [Plugin: Easy FancyBox] Easy fancybox not working when content is loaded via AJAX

  • Hi there.

    I’m using AJAX on my site to load in divs that contain thumbnails to FancyBox galleries. When viewed in their “natural state” the links open up a FancyBox gallery with no problem.

    However, when the div that contains these thumbnails is loaded onto a page via AJAX (using jQuery’s .load() method), the effect stops working.

    Not sure if that’s making sense, so here’s a link to the site I’m creating (it’s still in progress): If you click “photos”, the images are supposed to open up a gallery.

    If you go directly to the images open the gallery with no problem.

    I’m guessing it has something to do with other JavaScript on the home page, but I’ve googled and firebugged and read and checked all my functions, and I’m ready to bang my head against the !@#@$%%^* wall.

    Any thoughts?

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • Plugin Author RavanH


    Hi, yes: loading content via ajax does indeed circumvent the attachment of FancyBox to any links in that new content.

    You’d need either to re-fire the document ready event after new content has been loaded, or create a new event that the fancybox script can be bound to (for this, you will need the development version of Easy FancyBox and then customise it a tiny bit)…

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Easy FancyBox] Easy fancybox not working when content is loaded via AJAX’ is closed to new replies.