johnny / johnny/jquery-sortable

reattach event handler after a jquery .html()

Open
#276 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
1.5k
Forks
429
PR merge metrics
No merged PRs in 30d

Description

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);
}
});

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.