How to sort dynamically loaded list?

How to sort dynamically loaded list?


Hi all :)
I've got a problem. I've been working on it around a while, but I
couldn't find the answer.
Sortable Demo works well. I'd like to go one step forward and load a
list dynamically from a file.
I've got the main file - main.html - a little modified sortable demo
file:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$('body').load("list.html"); // SOMETHING NEW
$("#myList").sortable({});
});
</script>
<style>ul { list-style: none; }
li { background: #727EA3; color: #FFF; width: 100px; margin: 5px; font-
size: 10px; font-family: Arial; padding: 3px; }</style>
</head>
<body>
<script src="http://dev.jquery.com/view/trunk/plugins/dimensions/
jquery.dimensions.js"></script>
<script src="http://dev.jquery.com/view/trunk/ui/current/
ui.mouse.js"></script>
<script src="http://dev.jquery.com/view/trunk/ui/current/
ui.draggable.js"></script>
<script src="http://dev.jquery.com/view/trunk/ui/current/
ui.droppable.js"></script>
<script src="http://dev.jquery.com/view/trunk/ui/current/
ui.sortable.js"></script>
</body>
</html>
And I've got another file - list.html - which contains the list:
<ul id="myList">
     <li>Item 1</li>
     <li>Item 2</li>
     <li>Item 3</li>
     <li>Item 4</li>
</ul>
When I open main.html file in my browser, the list is loaded, but it
can't be sorted. Simply, I can't move any of <li> element. What am I
doing wrong ? :(