Hello,

I was wondering if jQuery can be used to load javascript dynamically,
on an as-needed basis. Here is the problem I have:

I want to load a page with as little javascript as possible. When
someone clicks on an item that requires some javascript functionality,
I want it to load a javascript function from an external file and then
execute it.

While there is some simple javascript I've found that can do this kind
of thing by appending the script to the DOM, it can't do things in
order. For instance, I want to load the function, and then execute it.
To do so, the javascript has to have some way to check if the funciton
exists. I don't like the idea of doing a time-out loop, so I was
wondering if jQuery has something built in for this kind of thing.

Thank you!
Chris

Reply via email to