Skip to content

Commit 0d03432

Browse files
lsoaresajpiano
authored andcommitted
Update example of selecting elements by tag name to *just* select elements by class name. Fixes jquery#252.
Qualification (prefixation) is no longer useful; as the modern browsers have the document.querySelectAll() available, qualification even slows down the process. Proof in:  http://jsperf.com/jquery-class-vs-tag-qualfied-class-selector/10
1 parent 3bc7e14 commit 0d03432

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $("#myId"); // note IDs must be unique per page
1616

1717
```
1818
// Selecting elements by class name
19-
$("div.myClass"); // performance improves if you specify element type
19+
$(".myClass");
2020
```
2121

2222
## Selecting Elements by Attribute

0 commit comments

Comments
 (0)