Greetings fellow meteorites!
In the process of installing an outside js plugin called intro.js https://github.com/usablica/intro.js Acc. to the install instructions, the only files needed are intro.js and introjs.css and then a introJs().start(); call can be made.
So… here is my environment setup.
-
The official jquery meteor package is installed https://atmospherejs.com/meteor/jquery
-
intro.js file is inside a client/lib/js directory.
-
introjs.css file is inside a client/lib/stylesheets/ directory
-
since the js will span multiple pages my call is in body.onRendered like so
Template.body.onRendered(function () {
introJs().start();
});
This function without delay doesn’t work but with delay like so
Template.body.onRendered(function () {
setTimeout(function() { introJs().start(); }, 5000);
});
IT WORKS!
Does anyone have any suggestions on how to fix this problem without a timeout? Perhaps restructuring my directories ? Perhaps using a different hook ?
Thanks and look forward to the response!
Alex