jquery error : $ is not defined

admin January 5, 2014 javascript jquery

This problem has two questions :-
Q1 : What is jquery?
And :- It’s the framework of javascript. it means some function are defined in javascript language to get done task easily.
Now let’s think something about other language like php. If I want to show something on the screen then I have to use echo or print statement, did you think that these statement have there definition written somewhere, which guides to these statement that show some output. So now when you want use $ or Jquery objects in your program this must be define anywhere for your program. Generally you can define it by following two ways :-

1. by use library of google or jquery or other. You can use it by here
2. by download that library on your server and include that library to your program. You can download jquery library from here

Q. How to resolve the error ‘$ is not defined’ or ‘jQuery is not defined’?
Ans. if you get such type of error $ is not defined or jQuery not defined then you must check following point :-

1. Did you include jquery library properly?
2. Don’t include jquery libray more then 1 time on the same page.
3. try to use :-

$(document).ready(function () {
//your code here
});

in your code. Because it will load your code when document start load on your page.
4. check that your jquery library refers $ or jQuery object.
5. Always use your jquery code after include jquery library.
6. Use add-ons like firebug for fireforx, and click on console. This tab will show you the exact issue.

I hope these points will help you. If you have any query please give your reply, I will try my best to give answer of your query.

Like
Like Love Haha Wow Sad Angry

1124 Responses

  1. gato io jogo

    Reading your article helped me a lot and I agree with you. But I still have some doubts, can you clarify for me? I’ll keep an eye out for your answers.

  2. RickeyJoits

    Pharmacies en ligne certifiГ©es – Pharmacie en ligne France

  3. 20bet

    Your article gave me a lot of inspiration, I hope you can explain your point of view in more detail, because I have some doubts, thank you. 20bet

  4. Suivre Téléphone

    Lorsque nous soupçonnons que notre femme ou notre mari a trahi le mariage, mais qu’il n’y a aucune preuve directe, ou que nous voulons nous inquiéter de la sécurité de nos enfants, surveiller leurs téléphones portables est également une bonne solution, vous permettant généralement d’obtenir des informations plus importantes..

  5. Suivre Téléphone

    Certains fichiers photo privés que vous supprimez sur votre téléphone, même s’ils sont définitivement supprimés, peuvent être récupérés par d’autres.