Support » Plugin: Easy FancyBox » Dynamicly added content via ajax?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author RavanH

    (@ravanh)

    You can trigger an event ‘post-load’ on the document after new content has been loaded. FancyBox will then become aware of the new content.

    Thread Starter bigkahunaburger

    (@bigkahunaburger)

    How do you do that?

    thanks

    Plugin Author RavanH

    (@ravanh)

    That depends on how you are loading your content… Did you create the ajax script yourself or is it included in a plugin or your theme?

    Thread Starter bigkahunaburger

    (@bigkahunaburger)

    I’m using this plugin for comments:

    https://codecanyon.net/item/commentator-wordpress-plugin/6425752?

    And I’m using this plugin for posts:

    https://wordpress.org/plugins/ajax-load-more/

    Thanks

    Plugin Author RavanH

    (@ravanh)

    Hi, a quick look at the Ajax Load More plugin does not reveal to me that it’s triggering the common “post-load” event after new posts are loaded. You might want to ask the developer to add it.

    Or ask for an example of how you could trigger it yourself as there does seem to be the option to define a custom jQuery function by the name almDone() that will be run after the post load animation…

    (added the ajax-load-more tag to this thread)

    dcooney

    (@dcooney)

    Jumping in here.
    I’m the developer of Ajax Load More.

    I just helped a user solve this issue by adding the following to his theme and hooking into the almComplete callback that is dispatched from core Ajax Load More.

    $.fn.almComplete = function(alm){
       $(document.body).trigger('post-load');
    };

    Hope this helps others.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Dynamicly added content via ajax?’ is closed to new replies.