Skip to content

Commit

Permalink
BACKLOG-22670: change selector to also add listener when element not …
Browse files Browse the repository at this point in the history
…yet displayed (#74)
  • Loading branch information
jsinovassin committed Apr 24, 2024
1 parent 78e853e commit 50e67db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/javascript/definitions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import $ from 'jquery';

$(document).ready(function () {
$('.delete-definitions img').click(function (event) {
$(document).on('click', '.delete-definitions img', function (event) {
const packageName = event.target.attributes['data-package'].value;

// eslint-disable-next-line no-alert
Expand All @@ -12,7 +12,7 @@ $(document).ready(function () {
}
});

$('.delete-nodetype img').click(function (event) {
$(document).on('click', '.delete-nodetype img', function (event) {
const nodetype = event.target.attributes['data-nodetype'].value;

// eslint-disable-next-line no-alert
Expand Down

0 comments on commit 50e67db

Please sign in to comment.