Jquery: append first li child to the end of the list
append, html-lists, jquery
Solution
There are many methods than you can use, like `appendTo` method.
$('ul li:first').appendTo('ul');
http://jsfiddle.net/Mb42Z/
or `insertAfter` method:
var $li = $('ul li');
$li.eq(0).insertAfter($li.last())
Note that element is moved and not removed.
- appendTo
- insertAfter
- :first
- last
Problem
``` <ul> <li>first children</li> <li>second children</li> <li>third children</li> </ul> ``` How can I use Jquery to remove first children and append it to end of ul list?