how do i get the id of the item being moved in a sortable? also how do i get the new position of the item?
its in an update block, but it wont give the id. here is my code:

$(function () {
            $("#sortable").sortable({ update: function (event, ui) {
                alert(ui.item.value);
            }
            })
        });
Member Avatar for stbuchok

you could probably do the following (haven't tested):

$(function () {
$("#sortable").sortable({ update: function (event, ui) {
alert($(ui.item).attr('id'));
}
})
});
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.