Sortable - Nested lists problem
Hi,
I'm using sortable() function in order to arrange nested lists.
My html :
<ul id="parent_0" class="parents">
<li id="child_1">Item 1
<ul id="parent_1" class="parents">
<li id="child_2">Item 2</li>
</ul>
</li>
<li id="child_3">Item 3
<ul id="parent_2" class="parents">
<li id="child_4">Item 4</li>
</ul>
</li>
</ul>
My js :
$('.parents').sortable(
{
items: '>li',
handle: 'span.anchor',
connectWith: '.parents',
dropOnEmpty:true,
helper:'clone',
placeholder: 'holder',
delay:0,
opacity: 0.4,
forcePlaceholderSize:true,
update: function(event, ui) {
$.post('myUrl.html',$(this).<div id=":13k" class="ii gt">
sortable('serialize',{ key: 'positions[]' }));
}
}
);
- When I drag child_4 to parent_0 I have 2 serialized posts, great.
-
When I drag child_2 to parent_2 I have 3 serialized post, the root ul,
and the two others ul which receives or removes elements.
- The problem : when I drag child_1 to parent_2 (as child_4 sibling) I
have only 1 serialized post, the root ul. But I want parent_2
serialization too !
After hours on Google search I found several plugins like :
- <a href="http://www.b-hind.eu/jquery/index.php" target="_blank">http://www.b-hind.eu/jquery/index.php</a>
- <a href="http://code.google.com/p/nestedsortables/wiki/NestedSortableDocumentation" target="_blank">http://code.google.com/p/nestedsortables/wiki/NestedSortableDocumentation</a>
- <a href="http://code.google.com/p/nestedsortables/" target="_blank">http://code.google.com/p/nestedsortables/</a>
Does it means my need is impossible with UI sortable/serialize functions ?
Thanks for any help
<font color="#888888">
--
Cyril, Nethik</font></div><blockquote style="margin: 1.5em 0pt;"></blockquote>