Damn you T.J. Crowder I love you ! You solved the problem I had for
like a week !
Here's a simple example :
<head>
<title>Sortable list</title>
<script src="lib/prototype.js" type="text/javascript"></script>
<script src="src/scriptaculous.js" type="text/javascript"></script>
<script type="text/javascript">
function test()
{
$('my_ul').update('<li id="li_3">li 3</li><li id="li_4">li 4</li>');
Sortable.create('my_ul', {
onChange:function(){
alert(Sortable.sequence('my_ul').join(''));
}
});
}
</script>
</head>
<body>
<ul id="my_ul">
<li id="li_1">li 1</li>
<li id="li_2">li 2</li>
<script type="text/javascript">
Sortable.create('my_ul', {
onChange:function(){
alert(Sortable.sequence('my_ul').join(''));
}
});
</script>
</ul>
<a href="#" onclick="test()">Change it!</a>
</body>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---