Test Case Boilerplate

Fork this way...

HTML

<script src="http://code.jquery.com/ui/jquery-ui-git.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/jquery-ui-git.css">

<div id="list">
 <div>Element 1</div>
 <div>Element 2</div>
 <div>Element 3</div>
 <div>Element 4</div>
 <div>Very long text Very long text Very long text Very long text Very long text Very long text Very long text Very long text Very long text Very long text  Very long text Very long text Very long text Very long text Very long textVery long text</div>
 <div>Element 5</div>
</div>

CSS

#list { background-color: #EEE; width: 300px; padding: 10px; }
#list div { border: solid 1px #000; background-color: #FFF; }

JavaScript

$(document).ready(function() { $("#list").sortable({axis: 'y', containment: 'parent'}); });