twitterfacebookgoogle plusrss feed

Pages

Scripts and Snipts

Find a lot of useful bits on different programming languages and general computer knowledge. Feel free to ask if you have any question!

Perfect blend of poetry and quotes

Besides programming, poetry is my passion. I wrote several poems and proses; not so appreciable but best step towards my passion.

Mystery of space science

I know web is full billions of pages on this topic, i just tried to collect some golden and mysterious information which is also "human understandable"!!

Monday, April 7, 2014

Possible reasons of jQuery library failed to load


Possible reasons of this error is one of the following

Path is incorrect or make sure you are typing the extension of file .js, did you ignored .js in the last as there is already dot before min (minify) so some peoples type jquery-1.7.min instead jquery-1.7.min.js. Or check that file is exists with the same name, it is jquery.js or jquery.min.js. As well as check the version of the file. One time I faced the same problem, mentioning jquery-1.2.min.js instead jquery-1.3.min.js.

If you are using CDN (Content Delivery Network), make sure the server of content provider is up and running.

Your jQuery library is not conflicting with other javascript libraries. Many JavaScript libraries use $ as a function or variable name, just as jQuery does. In jQuery's $ is an alias for jQuery. So try with jQuery instead $ sign or use jQuery.noConflict() or $.noConflict() before initializing ready() function. Go here to know how .noConflict() works.

Are you validating jQuery library or jQuery plugin with certain jQuery version, if so, then remember plugins developed for older jQuery versions might not function properly with latest version of jQuery. If you are somewhat depending on old jQuery plugin then use jQuery migrate plugin. Get detailed information about jQuery migrate plugin here, or pass comments to ask if you failed to get pie.

Check typography. Copy and past following lines into notepad, save as html and run, if it works (prompts with "hurray") it mean one of above solutions will work for you otherwise hmmm ,, seems annoying in modern era but i suggest you to check your browser's javascript settings, is it enabled.

<html><head>
<title>Validating jQuery</title>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
$(document).ready(function() {
   alert("hurray");
});
</script></head><body></body>