Last active
March 3, 2017 02:37
-
-
Save AlexandroPerez/0294c56ad21e98fc6541cb33f9e1c0ed to your computer and use it in GitHub Desktop.
How jQuery END works
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#lists') | |
.find(' > li') // FILTER1 #lists > li | |
.filter('li:last') // FILTER1_1 #lists > li:last | |
.addClass('coloring2') | |
.end() // go back to previous filter: FILTER1 #lists > li | |
.find('ul') // FILTER1_2: find ul inside #lists > li | |
.filter('> li') // FILTER1_2_1: ul > li inside #lists > li | |
.addClass('coloring') | |
.end() // go back one filter FILTER1_2 | |
.end() // go back one filter FILTER1 | |
.end() // go back one filter NO FILTER | |
.find('li') // FILTER2 #lists > li | |
.appendTo('body'); | |
//=================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment