Skip to content

Commit 66ac8e8

Browse files
author
Markus Amalthea Magnuson
committed
inconsist -> inconsistent
1 parent ffb9496 commit 66ac8e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

page/using-jquery-core/understanding-index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ var $div = $("#last");
6767
console.log( "Index: " + $div.index("div") ); // 2
6868
```
6969

70-
When `.index()` is called with a string argument, there are two things to consider. First, jQuery will implicitly call `.first()` on the original jQuery object. It will be find the index of the first element, not the last element in this case. This is inconsist, so be careful here.
70+
When `.index()` is called with a string argument, there are two things to consider. First, jQuery will implicitly call `.first()` on the original jQuery object. It will be find the index of the first element, not the last element in this case. This is inconsistent, so be careful here.
7171

7272
The second point to consider is that jQuery is querying the entire DOM using the passed in string selector and checking the index within that newly queried jQuery object. For example, when using `.index("div")` in the last example above, jQuery is selecting all of the `<divs>` in the document, then searching for the index that contains the first element in the jQuery object `.index()` is called on.
7373

0 commit comments

Comments
 (0)