Skip to content

Instantly share code, notes, and snippets.

@vrushank-snippets
vrushank-snippets / jQuery: preview image
Created June 26, 2013 11:25
jQuery: preview image
// Preview Image
function preview(input)
{
if (input.files && input.files[0])
{
var reader = new FileReader();
reader.onload = function (e) {
$('#preview_image')
.attr('src', e.target.result)