Just wrote out a long message and the site failed to load and I can't get it
back for some reason, damn IE7 :(

Basically, I'm wondering how to define my jQuery code in a seperate file? If
for example I've got something that's going to be on 95%+ of the pages, I'd
like to have it in a seperate .js file and then search for an element, then
execute the code, eg:

        if(document.getElementById('login-username') &&
document.getElementById('login-password')) { initLogin(); }

Just wondering what the best way is to do this via jQuery please?

Cheers,
Nick
-- 
View this message in context: 
http://www.nabble.com/Loading-jQuery-code-from-a-seperate-file--tp18064600s27240p18064600.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to