Search This Blog

Wednesday, August 25, 2010

Include runtime scripts using jQuery

You can also include scripts runtime using jQuery. It makes it easy to have lazy script loading.

See the example below :

$(function(){
    $("head").append("");

    //Or, loading only when the slow stuff is ready:
    $("img,form").load(function(){
        $("head").append("");
    });
});

No comments:

Post a Comment