I have something simple like this:
$(selector).append("somestuff");
But since I\'m going to reuse the selector I cache it with:
RichieHindle is correct. To expand:
Javascript variables allow the '$' character. So for example, you could have the following:
var $i = 1;
var i = 1;
Both i and $i have the same value, and both are perfectly legitimate variable names.
jQuery assigns itself (the jQuery object) to '$' because traditionally, that's what Javascript frameworks have done for selectors. There's no inherent meaning to '$' beyond what jQuery gives it.