Home >Web Front-end >JS Tutorial >jquery lazy loading external js implementation code_jquery

jquery lazy loading external js implementation code_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 17:43:431289browse
Copy code The code is as follows:

var gaJsHost = (("https:" == document.location. protocol) ? "https://ssl." : "http://www.");
$.getScript(gaJsHost "google-analytics.com/ga.js",function(){
try {
var pageTracker = _gat._getTracker("UA-123456-16");
pageTracker._trackPageview();
} catch(err) {}
});
Statement:
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