How to embed Jquery
Go to solution
Solved by Guest,
I came across this (i was doing it wrong)
(function(){var startingTime = new Date().getTime();var script = document.createElement("SCRIPT");script.src = '/src/js/jquery.js';script.type = 'text/javascript';document.getElementsByTagName("head")[0].appendChild(script);var checkReady=function(callback){if(window.jQuery){callback(jQuery);}else{window.setTimeout(function() { checkReady(callback);},20);}};checkReady(function($){$(function() { //run jquery code here });});})();
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now