Created
August 25, 2014 09:46
-
-
Save KnightAlex/b12d27b55d54745a777d to your computer and use it in GitHub Desktop.
Reverse a list with jQuery
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
var list = $('ul'); | |
var listItems = list.children('li'); | |
list.append(listItems.get().reverse()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment