Home > Web Front-end > JS Tutorial > Method of dynamically loading jQuery_jquery

Method of dynamically loading jQuery_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 15:54:33
Original
1338 people have browsed it

The example in this article describes the method of dynamically loading jQuery. Share it with everyone for your 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);
 }
}

Copy after login

I hope this article will be helpful to everyone’s jQuery programming.

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template