LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code


your image
CSS
body{
  background-color:#add8e6;
  
}
#img_contain{
  border:1px solid grey;
  margin-top:10px;
  width:520px;
  
}

#imgInp{
  margin-left:7px;
  padding:10px;
  background-color:gray;
  
}
#blah{
  height:320px;
  width:auto;
  display:block;
  margin-left: auto;
   margin-right: auto;
  padding:5px;
}
JS
function readURL(input) {

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

    reader.onload = function(e) {
      $('#blah').attr('src', e.target.result);

      $('#blah').hide();
      $('#blah').fadeIn(650);

    }

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

$("#imgInp").change(function() {
  readURL(this);
});
Term
Sat, 04/14/2018 - 20:43

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv