Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    I’d suggest looking at the list of scripts we enqueue in Jetpack’s Infinite Scroll module, since both modules have to achieve the same result: all necessary scripts must be enqueued.
    https://github.com/Automattic/jetpack/blob/3.9.1/modules/infinite-scroll.php#L178

    As you can see, when the Tiled Galleries module is active, we enqueue the scripts defined here:
    https://github.com/Automattic/jetpack/blob/3.9.1/modules/tiled-gallery/tiled-gallery.php#L89

    I hope this helps.

    Thread Starter cattolit

    (@cattolit)

    Hi Jeremy,
    Thanks a lot for your help, I’ve added the js to the ajax function and now everything works just fine.

    If it can helps to other people, in order to make Jetpack Tiled Gallery works with “Ajax Load More” plugin, the following code has to be added to a js loaded on the site:

    <script type="text/javascript">
    jQuery(document).ready(function($){
      $.fn.almComplete = function(alm){
    	$.getScript( "https://www.example.com/wp-content/plugins/jetpack/modules/tiled-gallery/tiled-gallery/tiled-gallery.js" );
    });
    </script>

    It will load the tiled-gallery.js and format correctly the galleries.

    Ciao,

    Tommaso Cattolico

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Load Tiled Gallery Libraries on AJAX Load’ is closed to new replies.