[eluser]Bramme[/eluser]
Hey all
I need some help with jQuery. Normally, I'd try and find out myself, but I've been trying all afternoon and can't figure it out.
I have a simple list that needs sorting. I'm using the jQuery UI sortable plugin.
This is what I have allready:
Code:
$(function() {
$("#site_navigation a").click(function() {
return false;
});
$("#site_navigation").sortable({
items: "li",
cursor: "move",
update: function(event, el) {
var foobar = $("#site_navigation").sortable("serialize");
alert(foobar);
}
});
});
The update function is where I'm stuck: according to the docs, the serialize option should give me an array I can use to determine in which order the items are sorted. However, that alert turns up empty.
How do I proceed from here? Don't worry about the ajax, I'm pretty sure I can figure that out myself.