views:

84

answers:

1

I have a div with elements below it that I am serializing. I am then posting that data to another page. The problem I have is I want to add something to the post but am unsure how. For example I have this:

var tabs_sorted = $("#sortable_tabs").sortable('serialize');
$.post(DOC_ROOT+"helpers/update_tab_position.php", tabs_sorted);

It then pass a $_POST array to my page of tabs_sort that I loop through by accessing the $_POST['tabs_sort'] array. I simply just want to add a $_POST'method' to this. Any ideas on how to do that?

A: 

The get(0) did not get all the elements. So I ended up doing this for anyone else trying to accomplish this:

var obj = $('#sortable_tabs').sortable('serialize');
obj += '&method=update_tab_position';
ngreenwood6
Oops I somehow thought you were calling the regular serialize method not the sortable one - sorry
Greg