I have something like this:
<ul>
<li id="li1">1</li>
<li id="li2">2</li>
<li id="li3">3</li>
</ul>
And I wonder if there is possible to move the list number 3, to the place of the list number 1 using javascript or jquery, like this:
<ul>
<li id="li3">3</li>
<li id="li2">2</li>
<li id="li1">1</li>
</ul>
Thanks for you time!
No jQuery solution :
Here is a demo : http://jsfiddle.net/wared/tJaJ9/.
Based on cookie monster's suggestion :
Just for fun :
A jQuery one :
You can use ajax sortable jquery plugin. One of my recommendation tutorial is Sortable Lists Using jQuery UI . Here user can re-order list using cursor pointer.
This should do the trick for you.
Here is a working jsfiddle