Clarify axes

This commit is contained in:
Rico Sta. Cruz 2015-04-17 16:57:10 +08:00
parent 91dbc77bd4
commit e39d7a1b52
1 changed files with 4 additions and 3 deletions

View File

@ -253,9 +253,10 @@ Axes
Steps of an expression are separated by `/`, usually used to pick child nodes. That's not always true: you can specify a different "axis" with `::`.
```sh
//ul/li # $('ul > li')
//ul/child::li # $('ul > li') - same
//ul/descendant-or-self::li # $('ul li')
//ul/li # ul > li
//ul/child::li # ul > li (same)
//ul/following-sibling::li # ul ~ li
//ul/descendant-or-self::li # ul li
//ul/ancestor-or-self::li # $('ul').closest('li')
```
{:.light}