Move list item to top of unordered list using jQuery

Found this even neater:

$('li').on('click', function() {
    $(this).parent().prepend(this);
});‚Äč

Live example

Leave a Comment