Found this even neater:
$('li').on('click', function() {
$(this).parent().prepend(this);
});
More Related Contents:
- jQuery find events handlers registered with an object
- jQuery Event : Detect changes to the html/text of a div
- How to force a html5 form validation without submitting it via jQuery
- jQuery and MooTools Conflict
- jQuery UI Autocomplete use startsWith
- jquery IE Fadein and Fadeout Opacity
- How can I check if a key is pressed during the click event with jQuery?
- Get element type with jQuery
- jQuery UI Dialog window loaded within AJAX style jQuery UI Tabs
- How can I use jQuery validation with the “chosen” plugin?
- Load website into DIV
- Timeout jQuery effects
- How to Call Controller Actions using JQuery in ASP.NET MVC
- jquery callback function only working on last loop
- What does autocomplete request/server response look like?
- Jquery sortable ‘change’ event element position
- Remove all HTMLtags in a string (with the jquery text() function)
- Display XML content in HTML page
- Cross-Origin Request Blocked on
- Enable/Disable a dropdownbox in jquery
- How to find the index of a row in a table using jquery
- JQuery DatePicker and beforeShowDay
- HTML5 required attribute not working
- Trigger change event of dropdown
- Simple jQuery code works fine until site is loaded via https://
- Dynamically adding to in jquery mobile
- jquery vertical mousewheel smooth scrolling
- jQuery selector where text = some value
- How to upload file with Phonegap and JqueryMobile?
- jQuery: execute array of functions sequentially (both deferreds and non-deferreds)