jQuery: Test if jQuery is installed with typeof
April 14th, 2010 by jeremychoneThere is a corner case where you need to know if jQuery is running on your page. Let’s say, you are using the ajaxForm plugin and that one of the input is of type “file.” ajaxForm will embed the call in a iFrame and the jQuery will not be included in it. So, for the page (or page fragment) that will be the target of such a call, you need to test if jQuery is running before running the script.
if (typeof($) != "undefined"){
$(document).ready(....
}
Unfortunately, ajaxForm does not support AJAX call in “text” only which would solve this problem.
April 14th, 2010 at 10:15 pm
[...] the original post here: Bits And Pix » jQuery: Test if jQuery is installed with typeof If you enjoyed this article please consider sharing [...]