jQuery(function ($) { var selectedImages = []; var demo = { init: function () { $("body").on("change", '.add-media-image', this.SelectImages); }, SelectImages: function (e) { var files = e.target.files; var anyWindow = window.URL || window.webkitURL; if (files) { for (var i = 0; i < files.length; i++) { if (files[i].type.match('image')) { selectedImages.push(files[i]); var imageUrl = anyWindow.createObjectURL(files[i]); var fileName = files[i].name; window.URL.revokeObjectURL(files[i]); } } } } } demo.init(); });
+1
+1
+1
+1
+1
+1
+1