Tuesday, 3 September 2013

$ issue as prefix jquery variable names

$ issue as prefix jquery variable names

I was going through the following post Why would a JavaScript variable
start with a dollar sign? where it is suggested to use $ as a prefix for
variable name which represent to jQuery objects.
var $email = $("#email");
I have no issue in respect to naming convention here but the issue is that
I can't select the whole variable by double clicking it. I do copy the
variable very often and paste it over the js file to make use of it. But
when I double click it in Visual Studio only "email" portion is selected
which is kind of frustrating experience, even in the browser only "email"
is selected. How to overcome this situation?

No comments:

Post a Comment