Gallery Manager
[resolved] [Plugin: Fancy Gallery] working with AJAXed posts (3 posts)

  1. dokukinopio
    Posted 5 years ago #

    Hi, nice plugin.
    I'm trying to use it with posts i've been loading using this technique:

    So it works fine for posts on my frontpage (normally loaded) but not with the posts that I load with ajax and insert into the innerhtml of a div on my page. They do have the fancy-gallery classes and so on, but I guess their event handlers aren't hooked up.

    So my question is, is it possible to re-run the event-handler initialization code (or however it works) for the fancy gallery? Because then I think I could load my posts from ajax, invoke the event-handler hooking up code, and be happy.

    Thanks in advance~


  2. Dennis Hoppe
    Plugin Author

    Posted 5 years ago #

    This is a nice tip. I will see how I could add support for Ajax interfaces. To make it work for now you could try to re-fire the jQuery "ready" event.

    You could try
    after you loaded the posts content or you could try

  3. Sergey.S.Betke
    Posted 4 years ago #

    Author: Thank you very much for your plugin. I ask you to add the ability to use your plugin for AJAXed sites. The following quote a modified version of the file fancy-js.php. In the beginning of the file - patch for support client-side caching (also ask you to include these changes in the next version of your plugin). At the end of the file - a subscription to an update AJAX event. Using the event "ready" will cause the processing of the document (that too), except that - will work and those handlers that should work only when document loaded. This is potential bag.
    AJAX loader just fire event:
    and Your plugin prepare just loaded (updated) content, not full document.

    fancy-js.php for AJAX:

    [Code moderated as per the Forum Rules. Please use the pastebin]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic