Date Added: 11/01/2017

/// JQUERY ///

$(document).ready(function() {

function readURL(input) {

if (input.files && input.files[0]) {
var reader = new FileReader();

reader.onload = function (e) {
$('#logo_show').find("img").attr('src', e.target.result);
}

reader.readAsDataURL(input.files[0]);
}
}

$("#ImageFile").change(function(){
readURL(this);

});

});

 /// JQUERY ///

 

///// HTML /////

<div class="col-sm-3">

<div class="col-sm-12 no-padding" id="logo_show">
<img src="/img/default.png" class="img-responsive"/>
</div>
<label for="ImageFile" class="btn bg-pallet1 text-white">Upload Logo</label>
<div class="inline"> <input name="ImageFile[]" id="ImageFile" type="file" required style="visibility:hidden;" /> </div>
</div>

///// HTML /////

Last Update: Posted by: müslüm ÇEN

Not Commented Yet !
Please login in order to comment . Login