Linked Questions
85 questions linked to/from Why would a JavaScript variable start with a dollar sign?
472
votes
13
answers
541k
views
What is the purpose of the dollar sign in JavaScript?
The code in question is here:
var $item = $(this).parent().parent().find('input');
What is the purpose of the dollar sign in the variable name, why not just exclude it?
89
votes
5
answers
398k
views
why put $ with $self and $body? And is self the same as $self [duplicate]
I'm learning jQuery by trying to understand other people's code. I ran into this:
jQuery.fn.myFunc = function(options, callback) {
//stuff
jQuery(this)[settings.event](function(e) {
var self ...
75
votes
5
answers
41k
views
When/why to prefix variables with "$" when using jQuery? [duplicate]
Possible Duplicate:
Why would a javascript variable start with a dollar sign?
I see people using the dollar sign in front of variables when using jQuery. Is there any reason behind this? I'm I ...
57
votes
5
answers
59k
views
Why use $ (dollar sign) in the name of javascript variables? [duplicate]
Possible Duplicates:
Why would a javascript variable start with a dollar sign?
JQuery : What is the difference between “var test” and “var $test”
What is the difference ...
15
votes
3
answers
3k
views
JQuery : What is the difference between "var test" and "var $test" [duplicate]
what is the difference between these statements? I know that "var $test" declares a jquery variable, but what is the difference of a jquery variable with a general javascript variable ?
8
votes
5
answers
8k
views
What's the difference between ‘var $x’ and ‘var x’ in javascript? [duplicate]
What's the difference between var $x and var x in javascript?
8
votes
4
answers
9k
views
$ at the beginning and at the end of variable [duplicate]
Possible Duplicate:
Why would a JavaScript variable start with a dollar sign?
I realized some syntax with jquery and didnt know what it is. here goes:
var $foo = $("bar").blah();
var hello$ = $("...
-1
votes
2
answers
2k
views
JavaScript function what is scope and why using $ [duplicate]
Possible Duplicate:
Why would a JavaScript variable start with a dollar sign?
I am not sure what $scope and $defer are but they just seem to work.
function xyz($scope, $defer) {
xyz = this;
...
5
votes
4
answers
680
views
Why is "$" a valid function identifier? [duplicate]
Possible Duplicates:
Can someone explain the dollar sign in Javascript?
Why would a javascript variable start with a dollar sign?
Why is it that I can assign a function to $ in Javascript, but ...
2
votes
4
answers
272
views
Is jquery $(this). the same as $? [duplicate]
I was wondering something about the $ of jQuery. I know that it refers to jQuery object, but I a found something a bit different today : $parent
In the code I'm working on, that's a substitute to $(...
3
votes
1
answer
760
views
Difference var foo and var $foo [duplicate]
Searched for duplicates but couldn't find any..
Is there any substantial difference between:
var $foo = $(this);
and
var foo = $(this);
??
2
votes
2
answers
1k
views
What is a difference between JS variables - with and without dollar sign? [duplicate]
What is a difference between these two variables? (please see dollar sign)
var $button = $("<input>");
and
var button = $("<input>");
?
0
votes
5
answers
526
views
variables in jQuery vs Javascript [duplicate]
So in jQuery you have $variable and in Javascript you have variable without the $
Why do you use the $ if you can just simply declare something as var variable? Why do you need to have jQuery $...
0
votes
1
answer
564
views
The difference between the javascript normal variable and the variable with a dollar sign [duplicate]
The question about javascript varabile with a dollar sign has been answered by a couple of times.
In short, the dollar sign plays as an identifier in javascript variable.
However, I was wondering ...
Sam's user avatar
- 4,693
3
votes
4
answers
285
views
What is the purpose of the $ operator in a javascript function declaration? [duplicate]
Possible Duplicate:
Why would a javascript variable start with a dollar sign?
Can someone explain the dollar sign in Javascript?
I was looking at a js tutorial where several of the functions ...