$ is what? [1]
[1] For those not in on the joke: http://en.wikipedia.org/wiki/42_(number)#The_Hitchhiker.27s_...
[1] For those not in on the joke: http://en.wikipedia.org/wiki/42_(number)#The_Hitchhiker.27s_...
From: http://stackoverflow.com/questions/1661197/valid-characters-...
$ is a function object.
$.answer is a property of that object.
$ itself doesn't really mean anything special in javascript.
jQuery and other libraries often use $ as their main object, so it's probably best to avoid using it unless you need to or it's wrapped in another function.
(function($) {
$('#thing').hide();
})(jQuery); (function($,undefined) {
"use strict";
...
})(jQuery);
Note the undefined. That's because undefined is not a literal but a variable in JavaScript and can be assigned to anything. This way I ensure that undefined is really undefined and "x === undefined" works. But I digress.My point was, the battle over the dollar sign single character variable name is stupid.