views:

26

answers:

1

I asked this question on the jQueryUI forums, but got no response.

I've created a sortable accordion but I can't seem to figure out how to serialize the indexes like you can on a non-accordion sortable.

on my H3 elements I have the id="agendas_1234" and then the following code. But the line where I define the params variable doesn't work. I don't get the same [1234,3456,123] that I would get with a regular sortable (no accordion)

$(tab).find('#accordion').accordion({
    header: "> div > h3",
    collapsible: true
}).sortable({
    axis: "y",
    handle: "h3",
    stop: function(event, ui) {
        stop = true;
    },
    update: function(event, ui) {
        var params = $(this).sortable('serialize');
    }
});
A: 

Finally figured something out.

http://www.dzone.com/links/jqueryui_serializing_data_for_a_sortable_accordion.html

Gregg