1

I use Keyframes and the Jquery plugin Smoothstate to make smooth and animated transitions between my pages with this method :

https://css-tricks.com/add-page-transitions-css-smoothstate-js/

The problem was that my jQuery plugins will not work, I needed to refresh the page in order for it to work again.

So I used this method : smoothState.js conflicting with other plugins

It works on my page main.js which contains all my jquery plugins.

Exemple of my main.js :

$(document).ready(function() {

    (function($) {
      $.fn.onPageLoad = function() {

        // HERE THERE ARE ALL THE PLUGINS.

      };
    }(jQuery));

    ('body').onPageLoad();

});

The problem is that I have other jquery plugin in my index.php (I can't move it because the jquery contains php). If the plugins in my main.js run well, the plugin in my index.php doesn't run.

If think they are a conflict ?

Exemple of my index.php :

<body>

    <!-- HERE THERE ARE ALL THE HTML. -->

    <!-- HERE THERE ARE ALL THE PHP. -->

    <script type="text/javascript">

        $(document).ready(function() {

            (function($) {
            $.fn.onPageLoad = function() {

                // HERE THERE ARE ALL THE PLUGINS.

            $('body').onPageLoad();

        });

    </script>

</body>
Community
  • 1
  • 1
user3870112
  • 311
  • 3
  • 18

0 Answers0