Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).on('change','.immidiate-show',function(){
- files = this.files;
- $.each( files, function(){
- file = $(this)[0];
- if (!!file.type.match(/image.*/)) {
- var reader = new FileReader();
- reader.readAsDataURL(file);
- reader.onloadend = function(e) {
- img_src = e.target.result;
- html = "<img class='img-thumbnail' style='width:300px;margin:20px;' src='"+img_src+"'>";
- $('.immidiate-show-box').append( html );
- };
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement