Hi guys,
I'm having some troubles with the sortable system.
Here's a simple example of my code :
<a href="#" onclick="reload();">Reload</a>
<ul id="my_ul">
<li id="li_1">test 1</li>
<li id="li_2">test 2</li>
</ul>
<script type="text/javascript">
Sortable.create('my_ul', {
onChange:function(){
alert(Sortable.sequence('my_ul').join(''));
}
});
</script>
When I load the page, there's no problem, I can reorder the list. But
when I'm clicking on the "Reload" link, there's no way I can move any
of the new li elements.
The reload(); function is quite basic:
function reload()
{
writediv('<li id="li_3">test 3</li><li id="li_4">test 4</li>',
'my_ul');
}
So I guess the Sortable function only work if I'm not editing the ul
list. Is there any tips I could use to do it?
Thanks guys.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---