I have a <div>
tag
<ul id="userpic" class="user pic">
<im class="pict"/>
Picture preview
</ul>
<div id="showpicname">
<div id="delpc"></div>
<div id="picnam"></div>
</div>
and a jQuery function to remove delpc
and picnam
:
$("#delpc").click(function () {
$(".pict").hide().fade(slow);
$("#delpc").hide().fade(slow);
$("#picnam").hide().fade(slow);
});
<input id="browse" type="file" name="upl" onchange="preview(this)" accept="image/*"/>
I am able to hide pict but unable to hide picnam and delpc and deselect the file selected by id="browse"
What am I doing wrong here? I am using the same method as hiding the class=pict img.
I have tried all the possible ways but no luck.
Help me out here please.
Thanks