I want to Show/Hide image by jQuery by clicking on same <div>.
I can’t swap the image with toggle function. I am using it with HTML. this is not working
<script type="text/javascript">
$(document).ready(function () {
$("cell").click(function () {
$('#img1').toggle("slow");
})
});
</script>
<div id="gridbox">
<div class="cell">
<div class="inner">
<span class="name">Bob</span> <br /> (id: 57)
<%-- <input type="hidden" class="friend_id" value="57 " />--%>
<img src="Images/mobile.jpg" alt="" id="img1" width="180" height="180"/>
</div>
</div>
use .cell instead of cell in ur first line