How To Make Two Lists Interchangeable, And When Selection Complete Save Dropped
I am using jQuery and specifying two selectors together. Then I try to refer each variable in this code: UL_HeadersToOmit - is the list to choose from UL_dropedCols - is the list t
Solution 1:
Solved: I was missing the receive
event as seen below.
$('document').ready(function() {
var results = [];
$('#UL_dropedCols, #UL_HeadersToOmit').sortable({
tolerance: 'pointer',
connectWith: '#UL_HeadersToOmit, #UL_dropedCols',
receive: function(event, ui) {
var draged = ui.item.attr("id");
results.push(draged);
}
});
$('#next').click(function() {
var RLength = results.length;
for (var i = 0; i < RLength; i++) {
alert(results[i]);
}
});
});
Post a Comment for "How To Make Two Lists Interchangeable, And When Selection Complete Save Dropped"