From 1301f51df934602ca0d68597339d8106cebccca1 Mon Sep 17 00:00:00 2001 From: Hsi-Wen Liu Date: Tue, 11 Jun 2019 00:38:40 +0800 Subject: [PATCH] Replace jquery load method with on method jQuery removed load event handler, on event handler should be used instead. --- src/wScratchPad.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wScratchPad.js b/src/wScratchPad.js index f90e68f..02f434a 100644 --- a/src/wScratchPad.js +++ b/src/wScratchPad.js @@ -122,7 +122,7 @@ $(new Image()) .attr('crossOrigin', '') .attr('src', this.options.fg) - .load(function () { + .on('load', function () { _this.ctx.drawImage(this, 0, 0, width, height); _this.$img.show(); }); @@ -317,4 +317,4 @@ first.target.dispatchEvent(simulatedEvent); }); }; -})(jQuery); \ No newline at end of file +})(jQuery);