[jQuery] Help writing function for sending a serialized post for updating a UL order
I have a UL:
<ul id="child_list">
<li id="item_1">One</li>
<li id="item_2">Two</li>
<li id="item_3">Three</li>
</ul>
I have a function:
$(document).ready(function() {
//sortables
$("#child_list").sortable({
opacity: 0.7,
revert: true,
scroll: true,
handle: $(".handle"),
change: function(sorted){
$.post("/admin/ajax/orderChildren.asp", { item_order_str: $
('#child_list').sortable("serialize") });
});
I am switching this over from scriptaculous, and I need to know if the
above is written correctly, and also, what would the data posted to
the orderChildren.asp page look like, and how would I access the
variable on that page?