Skip to content

Commit

Permalink
Merge branch 'master' of github.com:victorjonsson/jQuery-Form-Validator
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjonsson committed Sep 21, 2016
2 parents cf165c3 + 8cc79cf commit f00c9a3
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/modules/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,16 @@
reader.readAsDataURL(imgPath);

reader.onload = function(fileObj) {
setTimeout(function() {
image.onload = function() {
$(window).trigger('imageValidation', [this]);
successCallback(this);
};

image.onerror= function() {
errCallback();
};

image.src = fileObj.target.result;
}, 2000);
image.onload = function() {
$(window).trigger('imageValidation', [this]);
successCallback(this);
};

image.onerror= function() {
errCallback();
};

image.src = fileObj.target.result;
};
};

Expand Down

0 comments on commit f00c9a3

Please sign in to comment.