I want to alert “visible” when even one span is visible. But when i am running my function it is not alerting. example code link
//script
if($('.none').find('span').css('display')!='none'){
alert('visible')
}
//html
<div class="none">
<span style="display:none">first</span>
<span style="display:block">second</span>
</div>
//css
.none{display:none}
If the parent of element is hidden then the element is automatically hidden so you will get visible count = 0 for hidden parent.
To find out the elements will display:block
Live Demo