I need to bind the click function on each div of this ordered list in order to make hide/show an image on each imgXX div, I'm newbie with JQuery
<ol id='selectable'>
<li class="ui-state-default">
<div id="img01" class="img">
<div id="star01" class="star">
<img src="../ima/star.png" height="30px"/>
</div>
</div>
</li>
<li class="ui-state-default">
<div id="img02" class="img">
<div id="star02" class="star">
<img src="../ima/star.png" height="30px"/>
</div>
</div>
</li>
</ol>
JQuery
$('div').each(function(){
$(this).click(function(){
if($(this).find('img').is(':visible').length){
$(this).find('img').fadeOut(700);
}
else{
$(this).find('img').fadeIn(700);
}
});
});