2

Resolved

Only trigger dragEnd when order has changed

description

P:S. Is here a way to send request to server only when some items really reordered, not by click only on item ?

file attachments

comments

msilvalopes wrote Nov 4, 2010 at 4:44 PM

is just do
[js script]
 $("#list1").dragsort({ dragSelector: "div", dragBetween: true, dragEnd: saveOrder, placeHolderTemplate: "" });

    function saveOrder() {
        var serialStr = "";
        $("#list1 li").each(function(i, elm) { serialStr += (i > 0 ? "|" : "") + $(elm).children().html(); });
        $.post('submitOrder.php',{'neworder':serialStr},function(result){
            alert(result)
        });
    };
[example of work result on php]

msilvalopes wrote Nov 4, 2010 at 4:47 PM

ops, i forgot to send the files

msilvalopes wrote Nov 4, 2010 at 4:50 PM

p.s.: i forgot to say i disabled the second list

mcm_ham wrote Feb 25, 2012 at 10:10 AM

Implemented for 0.4.


** Closed by mcm_ham 11/20/2010 2:37 PM

mcm_ham wrote Feb 25, 2012 at 10:10 AM

llorca wrote Dec 14, 2012 at 5:44 AM

Hi how can I dragsort stop and start? Or disable and enable? In other function.

Because I want to use with together Uploadify.

Photo instantly uploading I want to stop or disable dragsort.Thank you.