I have a form which uses this little script found here to output the currently uploaded image to the visitor's browser itself. The output of the image is too abrupt. How do i make this script to fadein
the image into the div #blah.
<script>
$(document).ready(function() {
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#blah').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
$("#image-one").change(function(){
readURL(this);
});
});
</script>
Here is the html if it helps. Thanks in advance.
<fieldset class="images">
<label for="image" class="label">UPLOAD IMAGE :</label>
<input type="file" name="image-one" id="image-one" tabindex="25" required=""/>
</fieldset>
<div class="inline-image-preivew">
<img id="blah" src="#" width="300" align="center"/>
</div>