Please tell me how to catch the event of changing the position of an element (drag and drop) in jQuery Nestable

View Code

$(document).on('change', '.dd-handle', function(e) { e.preventDefault(); alert(); }); 

does not work :(

  • You need to catch changes to .dd , not .dd-handle - toxxxa
  • Suppose, how can we get for example the id of the current element ( <div class="dd-handle" data-id="1">Item 3</div> ), i.e. which was moved? - Guest
  • And what will this information of one displaced element give you? Get the entire list of `$ ('. Dd'). Nestable ('serialize');` - toxxxa
  • I have a category output there, if I receive the entire list, it will be necessary to update all categories in the database every time, which is not good. - Guest

0