jquery - Hide a div on file upload button click -


i need functionality that

where image shown in default

when file uploaded using {input type="file"} image hidden

http://jsfiddle.net/vvsan/1/

<div id='browse-img-sh'><img src="https://cdn4.iconfinder.com/data/icons/pretty_office_icon_part_2/64/man.png" /></div>     <input name="" type="file"> 

jquery(document).ready(function(){     jquery('#hideshow').live('click', function(event) {                  if (window.file && window.filereader && window.filelist && window.blob)         {             if (jquery('#file_input')[0].files[0] != undefined) {                 jquery('#content').toggle('show');             }         }         else {             console.log("file api not supported");         }     }); }); 

i think can you.


Comments