views:

169

answers:

0

Searched all over and I can't find the answer. I can't get my sortable to serialize. All I'm getting is null data

$(document).ready(function() {
    $("ul#sortable").sortable({
        update : function () {
            serial = $("ul#sortable").sortable("serialize");
            $.ajax({
                url: "sort_images_ajax.php",
                type: "post",
                data: serial,
                error: function(){
                    alert("theres an error with AJAX");
                },
                success: function(feedback){ $("#data").html(feedback); }
            });
        }

    });
});

Here's my html:

<ul id="sortable">
<li id="sort_1" class="ui-state-default">1</li>
<li id="sort_2" class="ui-state-default">2</li>
<li id="sort_3" class="ui-state-default">3</li>
</ul>

Since I'm using jquery 1.4.2, I found this piece of info here at Stack Overflow:

jQuery.ajaxSettings.traditional = true;

With or without that last piece of code, I can't get it to serialize. Any suggestions?