Skip to content

Commit ffc3002

Browse files
committed
Removed reference to use of hungarian notation.
Originally the variable was called $divs (I think). However the use of Hungarian notation has since been removed from this tutorial. I noticed while reading this that there was still an explanation as to why the variable started with a "$" although the variable no longer did. This kind of confusing so I've removed it and I think it's better without the explanation.
1 parent 2223335 commit ffc3002

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

page/using-jquery-core/selecting-elements.md

-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ jQuery doesn't cache elements for you. If you've made a selection that you might
9595
var divs = $( "div" );
9696
```
9797

98-
In the example above, the variable name begins with a dollar sign. Unlike in other languages, there's nothing special about the dollar sign in JavaScript – it's just another character. Here, it's used to indicate that the variable contains a jQuery object. This practice is merely convention, and is not mandatory.
99-
10098
Once the selection is stored in a variable, you can call jQuery methods on the variable just like you would have called them on the original selection.
10199

102100
A selection only fetches the elements that are on the page at the time the selection is made. If elements are added to the page later, you'll have to repeat the selection or otherwise add them to the selection stored in the variable. Stored selections don't magically update when the DOM changes.

0 commit comments

Comments
 (0)