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.
var startelement = null; $("#sortable").sortable( { start: function (event, ui) { startelement = $(this) }, beforestop: function(event, ui) { console.log(startelement); }, connectwith: "#sortable2" } );
Comments
Post a Comment