Or as another option, if you just care newer browsers (>= IE9), setup
a capturing listener for the "load" event:

    document.addEventListener('load', done, true);

    function done(e) {
        var target = e.target;
        if (target.nodeName.toLowerCase() == 'script') {
            // check that target.src correspond to the path
            // of the script you wish to be notified for
            if (target.src == 'jquery.min.js') {
                // execute your jQuery stuff ...
            }
        }
    }

The "done" function will be invoked for for each loaded script.

Remember that this will not work for IE6-8, but there are similar
tricks for these older browsers.

Have fun,

Diego


On Mon, Aug 1, 2011 at 6:10 AM, Dmitry Pashkevich <[email protected]> wrote:
> Or LABjs which has a smaller footprint.
> http://labjs.com/
>
> --
> To view archived discussions from the original JSMentors Mailman list:
> http://www.mail-archive.com/[email protected]/
>
> To search via a non-Google archive, visit here:
> http://www.mail-archive.com/[email protected]/
>
> To unsubscribe from this group, send email to
> [email protected]
>

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to