[jQuery] detect visibility of nested elements

[jQuery] detect visibility of nested elements


hello,
is there a selector or something to detect the visibility of a nested
element?
for example, i got the following:
<div style="display:none">

Invisible text

</div>
'p:visible' will return the preceding p-tag, although it's not visible
at all, as it's parent isn't.
do i have to loop through all parents and check their 'display'
property or maybe there's a more elegant solution to this?
max