Plugin not working with page transitions
-
I’m using the Smoothstate library for transitions between pages, all right until I put the “Restaurant Reservations” plugin, which I can not start in the SmoothState onAfter method. What can I do to start the plugin when the page is updated in the transition.
Example
$(function(){ 'use strict'; var options = { prefetch: true, pageCacheSize: 4, blacklist : '', development : false, cacheLength: 2, anchors: 'a', onBefore: function($container){ }, onStart: { duration:2500, // Duration of our animation render: function ($container) { // Add your CSS animation reversing class loaderaparece(); toTop(); $container.addClass('is-exiting'); // Restart your animation smoothState.restartCSSAnimations(); } }, onReady: { duration: 1300, render: function ($container, $newContent) { // Remove your CSS animation reversing class $container.removeClass('is-exiting'); loaderOut(); // Inject the new content $container.html($newContent); } }, onAfter: function($container) { destroyParallax(); parallaxImage(); overlayMenu(); parrallaxClass(); sliderMia(); mouseTarget(); initMap(); reservas(); } }, smoothState = $('#main').smoothState(options).data('smoothState'); }); function reservas(){ tb_booking_form.init(); }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Plugin not working with page transitions’ is closed to new replies.