From 933bddebe330e645b33060af04824479ae5bbbe2 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Mon, 22 Feb 2021 16:25:55 +0100 Subject: [PATCH] Image attribute: Migrate deprecated jQuery methods in JS widget --- js/edit_image.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/edit_image.js b/js/edit_image.js index 8560f4eb0..7b0df7938 100644 --- a/js/edit_image.js +++ b/js/edit_image.js @@ -95,7 +95,7 @@ $(function() _bindEvents: function () { const me = this; - $('#file_'+me.options.input_name).change(function () { + $('#file_'+me.options.input_name).on('change', function () { $('#do_remove_'+me.options.input_name).val('0'); me.previewImage(this, '#preview_'+me.options.input_name+' img'); @@ -111,7 +111,7 @@ $(function() $('#file_'+me.options.input_name).trigger('click'); }); - $('#reset_'+me.options.input_name).click(function () { + $('#reset_'+me.options.input_name).on('click', function () { if ($(this).prop('disabled')) { return; } @@ -136,7 +136,7 @@ $(function() } }); - $('#remove_'+me.options.input_name).click(function () { + $('#remove_'+me.options.input_name).on('click', function () { if ($(this).prop('disabled')) { return; }