Var names with jQuery so a dollar sign before it

Var names with jQuery so a dollar sign before it
0

#1

I see that on some codes use dollar sign before the name like

var $thisone = $(’.thisone’);

On both side need to set dollar sign? like in var names and where to use it?

Or hiw its going on if stay simple var names?

Thanks.


#2

Jquery shorter sign.
You become with that later. https://www.w3schools.com/Jquery/default.asp
To use you must declare

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

#3

It is used to make it clear the variable is a special jQuery object vs a normal DOM element. It is strictly informational only. You could just as easily write:

var thisone = $(’.thisone’);

#4

Thanks!

Still a question when use var names in a function that means is have only in function so that can use in another function a name and set another value for it?