Scipion
Scipion

Reputation: 11888

Add event when an element is moved (jQueryui sortable)

I have several divs that I can order by dragging and dropping them (exactly as shown on the example in http://jqueryui.com/sortable/). I would like to add an event each time one of this div is dropped, any idea how could I achieve so ?

Upvotes: 1

Views: 259

Answers (1)

Dhiraj
Dhiraj

Reputation: 33618

Use .stop()

$("#sortable").sortable({
    cancel: ".fixed",
    stop: function( event, ui ){
        alert('change');
    }
});

Here is a demo

Upvotes: 1

Related Questions