SHARE

Check JQUERY Is Loaded Correctly

Sometime ,because of web browser issues JQuery is not correctly load. In that case functions depends on jQuery not work properly . To check that jquery is load correctly and working ,there is a simple technique to check this .

Script Code

<script type=”text/javascript”>
if (typeof jQuery != ‘undefined’) {

alert(“jQuery library is loaded!”);

}else{

alert(“jQuery library is not found!”);

}

</script>

Copy the following script just before </body> tag of you web page ,in which you want to test jquery loading . Save the code and reload the web page in web browser.

Example

<script type=”text/javascript” src=”../jquery.js”></script>

<script type=”text/javascript”>
if (typeof jQuery != ‘undefined’) {

alert(“jQuery library is loaded!”);

}else{

alert(“jQuery library is not found!”);

}

</script>

</body>

If JQuery load correctly than a massage is displayed “jQuery library is loaded” . If jquery not loads correctly than massage is displayed “jQuery library is not found” .

Note : Assure that jquery link tag is placed before this script .