Very common use in jQuery is to distinguish jQuery objects stored in variables from other variables.
For example, I would define:
var $email = $("#email"); // refers to the jQuery object representation of the dom object
var email_field = $("#email").get(0); // refers to the dom object itself
I find this to be very helpful in writing jQuery code and makes it easy to see jQuery objects which have a different set of properties.
Related Contents:
- Why aren’t ◎ܫ◎ and ☺ valid JavaScript variable names?
- What is the purpose of the dollar sign in JavaScript?
- What is the javascript filename naming convention?
- Is the underscore prefix for property and method names merely a convention?
- JavaScript naming conventions [closed]
- Node.js project naming conventions for files & folders
- Standard conventions for indicating a function argument is unused in JavaScript
- Naming convention for const object keys in ES6
- JavaScript naming convention for promises? [closed]
- Is there an official style guide or naming convention for React based projects?
- How to decide when to use Node.js?
- Fastest method to replace all instances of a character in a string [duplicate]
- OnChange event using React JS for drop down
- prototype based vs. class based inheritance
- Better way to disable console inside unit tests
- Remove querystring from URL
- What is the difference between $routeProvider and $stateProvider?
- How to remove part of a string before a “:” in javascript?
- Calling dynamic function with dynamic number of parameters [duplicate]
- Vue.js img src concatenate variable and text
- Solutions for distributing HTML5 applications as desktop applications? [closed]
- get keys of json-object in JavaScript [duplicate]
- How can I detect whether an iframe is loaded?
- generate random string for div id
- Differences between Isotope and Masonry jQuery plugins [closed]
- Difference between using Array.isArray and instanceof Array
- Get DOM content of cross-domain iframe [duplicate]
- JSLint’s issue with ‘window’ as a global variable
- Vue JS – How to get window size whenever it changes
- jQuery: How to get the event object in an event handler function without passing it as an argument?
- Accessibility and all these JavaScript frameworks
- How do I use MS-XCEP and MS-WSTEP in .NET or JavaScript to get a certificate from AD CS?
- How to set ChartJS Y axis title?
- How to pass a value to razor variable from javascript variable?
- How to Create a Form Dynamically Via Javascript
- How to detect the installed Chrome version?
- Multi-row insert with pg-promise
- How to use promise in forEach loop of array to populate an object
- Sending a MediaStream to host Server with WebRTC after it is captured by getUserMedia
- three.js – How can I dynamically change object’s opacity?
- How to get all elements which name starts with some string?
- Circular buffer in JavaScript
- Vue.js “Maximum call stack size exceeded” error. Passing data from parent to child failing
- How to update dependencies of dependencies using npm
- Defaultdict equivalent in javascript
- Setting JavaScript window.location
- How to count the correct length of a string with emojis in javascript?
- How to update webpack config for a react project created using create-react-app?
- What are the differences between readable and data event of process.stdin stream?
- How to scale images on a html5 canvas with better interpolation?