Skip to content

Commit 9e9d3ec

Browse files
authored
Merge pull request #23 from lucaslm/issue-20-a
Fixing event being bound over once when page contains more than one editor
2 parents d254534 + 36e50cd commit 9e9d3ec

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

jquery-menu-editor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ function MenuEditor(idSelector, options) {
11141114
$form.find("[name=icon]").val(e.icon);
11151115
});
11161116

1117-
$(document).on('click', '.btnRemove', function (e) {
1117+
$main.on('click', '.btnRemove', function (e) {
11181118
e.preventDefault();
11191119
if (confirm(settings.textConfirmDelete)) {
11201120
var list = $(this).closest('ul');
@@ -1131,7 +1131,7 @@ function MenuEditor(idSelector, options) {
11311131
}
11321132
});
11331133

1134-
$(document).on('click', '.btnEdit', function (e) {
1134+
$main.on('click', '.btnEdit', function (e) {
11351135
e.preventDefault();
11361136
itemEditing = $(this).closest('li');
11371137
editItem(itemEditing);

0 commit comments

Comments
 (0)