Jquery and Jslint - '$' was used before it was defined Jquery and Jslint - '$' was used before it was defined jquery jquery

Jquery and Jslint - '$' was used before it was defined


Add these options to your comments:

/*jslint browser: true*//*global $, jQuery, alert*/


If you want to use variables provided by other scripts, then you need to say so:

/*global $ */


For JSLint In Netbeans IDE go to:

Tools - Options - Miscellaneous - JSLint tab - Text area under "Predefined (, separated)":

  • add $;
  • add your other project global variables, separating with comma.

Now JQuery variable $ is considered defined everywhere in code.