Skip to content

Commit 45a2aef

Browse files
committed
cleaning up my words
1 parent 7497a47 commit 45a2aef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/jquery-basics/traversing.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ title : "Traversing"
55
---
66
## Traversing
77

8-
Once you have made an intial selection with jQuery, you may want to traverse a little deeper into what you just selected. Traversing can be broken down into three basic parts: parents, children and sibilings. jQuery has an abundance of easy to use methods for all these parts. You will notice that each of these methods can optionaly be passed string selector and some can also take another jQuery object in order to filter your selection down. Be sure to pay attention and refer to the API docs to know what all variation of arguments you have available.
8+
Once you have made an intial selection with jQuery, you may want to traverse deeper into what was just selected. Traversing can be broken down into three basic parts: parents, children and sibilings. jQuery has an abundance of easy to use methods for all these parts. You will notice that each of these methods can optionaly be passed string selector and some can also take another jQuery object in order to filter your selection down. Be sure to pay attention and refer to the API docs to know what all variation of arguments you have available.
99

1010

1111
### Parents
1212

13-
There are four methods for finding the parents from a selection: `$.fn.parent`, `$.fn.parents`, `$.fn.parentsUntil` and `$.fn.closest`.
13+
The methods for finding the parents from a selection: `$.fn.parent`, `$.fn.parents`, `$.fn.parentsUntil` and `$.fn.closest`.
1414

1515
<div class="example" markdown="1">
1616
Selecting an element's direct parent
@@ -35,7 +35,7 @@ Selecting the closest parent, note that only one parent will be selected.
3535
</div>
3636
### Children
3737

38-
There are only 2 methods for finding child elements from a selection: `$.fn.children` and `$.fn.find`. The difference between these methods lies in how far into the child structure the selection is made. `$.fn.children` only operates on direct child nodes, while `$.fn.find` can traverse recursively into children, and children of those children, etc.
38+
The methods for finding child elements from a selection: `$.fn.children` and `$.fn.find`. The difference between these methods lies in how far into the child structure the selection is made. `$.fn.children` only operates on direct child nodes, while `$.fn.find` can traverse recursively into children, and children of those children, etc.
3939

4040
<div class="example" markdown="1">
4141
Selecting an element's direct children
@@ -50,7 +50,7 @@ Finding all the links within a selection that match the selector
5050

5151
### Sibilings
5252

53-
The rest of the traversal methods within jQuery all deal with finding sibiling selections. There are a few basic methods as far as direction is concerned. You can find previous elements with `$.fn.prev`, next elements with `$.fn.next` and both with `$.fn.sibilings`. There are also a few other methods that build onto these methods, similar to how `$.fn.parentsUntil` works; `$.fn.nextAll`, `$.fn.nextUntil`, `$.fn.prevAll` and `$.fn.prevUntil`.
53+
The rest of the traversal methods within jQuery all deal with finding sibiling selections. There are a few basic methods as far as direction is concerned. You can find previous elements with `$.fn.prev`, next elements with `$.fn.next` and both with `$.fn.sibilings`. There are also a few other methods that build onto these basic methods, similar to how `$.fn.parentsUntil` works; `$.fn.nextAll`, `$.fn.nextUntil`, `$.fn.prevAll` and `$.fn.prevUntil`.
5454

5555
<div class="example" markdown="1">
5656
Selecting an element's next sibiling that matches the given selector

0 commit comments

Comments
 (0)