Dynamically loading jQuery's methods
- 2020-06-15 07:43:37
- OfStack
The example of this article describes the method of dynamic loading jQuery. Share to everybody for everybody reference. The details are as follows:
function checkJquery() {
if(!(window.jQuery)) {
var s = document.createElement('script');
s.setAttribute('src', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js');
s.setAttribute('type', 'text/javascript');
document.getElementsByTagName('head')[0].appendChild(s);
}
}
Hopefully, this article has been helpful in your jQuery programming.