Ask questions and get good answers on jQuery

How do I know if jQuery is loaded on the page?

If not loaded on the page as I do for inject it on the page?

asked Nov 05 '09 at 11:48

Federico%20Soldani's gravatar image

Federico Soldani
173128

edited Nov 07 '09 at 08:29

Pietro%20Polsinelli's gravatar image

Pietro Polsinelli ♦♦
407


Hello, you can use window.jQuery, just like it :

if(window.jQuery){ alert('loaded'); }else{ alert('no'); }

You can easily inject it on the page if you use Google AJAX Libraries API, with google.load()

answered Nov 05 '09 at 13:19

Stf's gravatar image

Stf
462

Your answer
toggle preview

jQuery main site - Matteo Bicocchi