Last active
October 12, 2016 17:03
-
-
Save chancesmith/b70a38b66a0b33e05d5f95a2e544477b to your computer and use it in GitHub Desktop.
Float specific li items to the top of a list
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
| // list featured collections in opposite order desired | |
| var featured = ['Metal Signs', | |
| 'Canvas Prints', | |
| 'Gallery Prints']; | |
| var ul = $(".list"); | |
| for(var i = 0; i < featured.length; i++){ | |
| ul.prepend( $( ".list li:contains('" + featured[i] + "')" ) ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment