jquery-sortable icon indicating copy to clipboard operation
jquery-sortable copied to clipboard

reattach event handler after a jquery .html()

Open olvani opened this issue 6 years ago • 0 comments

Your script works fine when loading a page but when we refresh the list of elements with .html() after call ajax, I attach again the event after but everything does not work properly like the ondrop.

$ ( "# Listeelements") html (response).

//this click below linked on the element about delete works $ ('. BtnImageDelete'). On ('click', function (event) { .... });

//this sortable below linked on the element about sort works badly //the drag works but the drop zone is not displayed and the element does not intercalate. Once //released it returns to its original position.

var group = $ ('#sort-it ol.ollp') sortable ({ group: 'ollp', delay: 500, onDrop: function (item) { onDropImage (item, group); } });

olvani avatar Nov 06 '19 16:11 olvani