Created
July 25, 2013 10:13
-
-
Save hayatbiralem/6078474 to your computer and use it in GitHub Desktop.
[jQuery] Selecting all but first-child
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
// Source: http://forum.jquery.com/topic/jquery-selecting-all-but-first-child | |
// Most easy to understand, get all li elements except for the first one. | |
$("li:not(:first-child)") | |
// Get all li elements and slice off the first | |
$("li").slice(1) | |
// Get all li elements that are prepended by an li | |
$('ul li+li') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment