Support » Plugin: Use Google Libraries » [Plugin: Use Google Libraries] Defer parsing

  • Resolved beeneeb



    I would like to defer the parsing of the jquery library, but I’m not sure if I should add the code to the use-google-libaries.php file or in my WordPress installation. Here’s the script that I typically use:

    <script type="text/javascript">
     // Add a script element as a child of the body
     function downloadJSAtOnload() {
     var element = document.createElement("script");
     element.src = "deferredfunctions.js";
     // Check for browser support of event handling capability
     if (window.addEventListener)
     window.addEventListener("load", downloadJSAtOnload, false);
     else if (window.attachEvent)
     window.attachEvent("onload", downloadJSAtOnload);
     else window.onload = downloadJSAtOnload;


    Any thoughts?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Use Google Libraries] Defer parsing’ is closed to new replies.