jquery ui sortable, get sending object -


i have 2 tables items can sort/drop between both. in beforestop method trying access sender, element item has come form - getting null.

http://api.jqueryui.com/sortable/#event-beforestop

  $( "tbody" ).sortable({             connectwith: "tbody",             distance: 15,             beforestop: function(event, ui) {                  console.log(ui.sender); 

the console says

null 

how can element item has come from?

you can keep source container in variable on start event.

jsfiddle demo

var startelement = null;  $("#sortable").sortable(     {         start: function (event, ui) {             startelement = $(this)         },         beforestop: function(event, ui) {             console.log(startelement);         },         connectwith: "#sortable2"     } ); 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -