June
June

Reputation: 823

Jquery Sortable

<script type="text/javascript">
    $("#gallery").dragsort({
        dragSelector: "div",
        dragEnd: saveOrder,
        placeHolderTemplate: "<li class='placeHolder'><div></div></li>"
    });

    function saveOrder() {
        var data =  $("#gallery li").map(function() {
                        return $(this).attr("itemID");
                    }).get();
        $.post("example.php", { "ids[]": data });
    };
</script>

I am learning jquery , and I am eager to learn more about it, I read a tutorial out there on how to save jquery sortable , But i need a code where i can delete a item and have it saved using php. I am able to make it work for one where i posted id of one particular sortable and deleted , i read about each and tried but failed :) so for more than one(automatic) it is getting troublesome for me, as i need to have id or something to save deleted in database,

I seem to be lost direction, some help can really help me sharpen my skills.

Js Fiddle Here

Upvotes: 0

Views: 519

Answers (1)

kwicher
kwicher

Reputation: 2082

Hi have a look there if it does as you wish. K

Upvotes: 1

Related Questions