From aab236e992b0258375a740d78f1c928766eaff57 Mon Sep 17 00:00:00 2001 From: Nelvin Driz Date: Thu, 6 Dec 2012 18:28:03 +0800 Subject: [PATCH] Update jquery.html5_upload.js Fix for IE8 compatibility. --- jquery.html5_upload.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jquery.html5_upload.js b/jquery.html5_upload.js index ae16c73..7e56367 100755 --- a/jquery.html5_upload.js +++ b/jquery.html5_upload.js @@ -216,11 +216,12 @@ if (options.autostart) { $(this).bind('change', upload); } - for (event in available_events) { + var self = this; + $.each(available_events, function(event) { if (options[available_events[event]]) { - $(this).bind("html5_upload."+available_events[event], options[available_events[event]]); + $(self).bind("html5_upload."+available_events[event], options[available_events[event]]); } - } + }); $(this) .bind('html5_upload.start', upload) .bind('html5_upload.cancelOne', function() {