WordPress.org

Ready to get started?Download WordPress

Forums

Use Google Libraries
[resolved] Defer parsing (3 posts)

  1. beeneeb
    Member
    Posted 2 years ago #

    Hello,

    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:

    http://code.google.com/speed/page-speed/docs/payload.html#DeferLoadingJS

    <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";
     document.body.appendChild(element);
     }
    
     // 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;
    
    </script>

    =================================================

    Any thoughts?

    http://wordpress.org/extend/plugins/use-google-libraries/

  2. Ali Valizadeh
    Member
    Posted 2 years ago #

    This plugin I had no effect.

  3. Jason Penney
    Member
    Plugin Author

    Posted 2 years ago #

    I don't think this has anything to do with my plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic