Created
May 14, 2013 15:17
-
-
Save garystorey/5576754 to your computer and use it in GitHub Desktop.
reverse an unordered (or ordered list) with jQuery
This file contains hidden or 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 $sel = $("ul"), | |
| list = $sel.find('li').get().reverse(); | |
| $sel.empty().append(list); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be nice to do this without removing from the list and use css transitions to "move" them into place.