www.webdeveloper.com
Results 1 to 3 of 3

Thread: defer parsing of jquery

  1. #1
    Join Date
    Aug 2012
    Posts
    1

    defer parsing of jquery

    Hi All,
    I am using below js code for jquery defer parsing.
    Here is my code:
    <script type="text/javascript">

    function downloadJSAtOnload() {
    var element = document.createElement("script");
    element.src = "jquery-1.3.2.js";
    document.body.appendChild(element);

    /*
    $(document).ready(function(){
    $("a").addClass("test");

    });
    */


    }

    // 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>

    How can call $(document).ready for the above code?
    Please help me asap...

    Thanks in advance ...

  2. #2
    Join Date
    Feb 2003
    Location
    Michigan, USA
    Posts
    5,774

  3. #3
    Join Date
    Feb 2003
    Location
    Michigan, USA
    Posts
    5,774

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles