views:

57

answers:

3
+1  A: 

You can do it by using jQueryUI. there's a very nice example here:

http://www.shopdev.co.uk/blog/sortable-lists-using-jquery-ui/

Marcos Placona
A: 

The TinySort plugin should sort you out: http://plugins.jquery.com/project/TinySort

Steve Claridge
A: 

As long as you know the positions you want to go in and move around you can. Here's an example:

In this case remove the :eq(2) (third, 0 based) element, then insert it after the first.

$(document).ready(function(){
  $("ul li:eq(2)").remove().insertAfter($("ul li:eq(0)"));
});

<ul> 
    <li>
       <div id="div1"> first </div>
    </li>
    <li>
       <div id="div2"> second </div>
    </li>
    <li>
       <div id="div3"> third </div>
    </li>
</ul>

There are a few other options as well, but the answer is yes you can do this.

Nick Craver
great stuff, that's what you call K.I.S.S. method turn into practice :) thanks!
klon