blivesta / animsition

A simple and easy jQuery plugin for CSS animated page transitions.
http://git.blivesta.com/animsition
MIT License
3.83k stars 781 forks source link

Issue with VueJS #145

Open eather009 opened 6 years ago

eather009 commented 6 years ago

I am getting error with VueJS project. I have bought Canvas html templates and got animsition as used plugin there. When I see demo, that works fine, but when implement with VueJS I am getting following error

Animsition: Element does not exist on page. Animsition: Does not support this browser.

Following code gives the result

var support = __.supportCheck.call(this, options);

      if(!support && options.browser.length > 0){
        if(!support || !this.length){
          // If do not have a console object to object window
          if (!('console' in window)) {
            window.console = {};
            window.console.log = function(str){ return str; };
          }
          if(!this.length) console.log('Animsition: Element does not exist on page.');
          if(!support) console.log('Animsition: Does not support this browser.');
          return __.destroy.call(this);
        }
      }

Is there any solution for this? I have to prepare a project within short time to show demo. Please help

eather009 commented 6 years ago

Solved with

Vue.loadScript("../../static/js/jquery.js") .then(() => { Vue.loadScript("../../static/js/plugins.js") .then(() => { Vue.loadScript("../../static/js/functions.js") .then(() => {}) .catch((ee) => {

                });
        })
        .catch((ee) => {});
})
.catch((ee) => {});

https://www.npmjs.com/package/vue-plugin-load-script