溢出隐藏的jQuery选择器 [英] Overflow hidden jQuery Selector
问题描述
我在< div>
中有几个< p>
元素。 < div>
有 overflow-y:auto;
隐藏某些 p>
元素,除非您向下滚动。
请参阅 http://jsfiddle.net/qnuxs/1/
I have several <p>
elements inside a <div>
. The <div>
has overflow-y:auto;
which is hiding some <p>
elements from view unless you scroll down.
See http://jsfiddle.net/qnuxs/1/
我如何编写一个仅选择< p>
完全(不部分)可见并且不隐藏的元素的jQuery选择器视图溢出。
How can i write a jQuery selector that only select <p>
elements that are fully(not partially) visible and not hidden from view with overflow.
所以从jsfiddle的例子我提供的选择器应该给我第一个2 $ code>< p>' 000和111),因为它们是完全视图中唯一的标签。
So from the jsfiddle example i provided the selector should give me the first 2 <p>'s
(000 and 111) since they are the only tags fully in view.
注意:不是全部< p>
必需的标签具有相同的高度。身高可以有所不同
Note: not all <p>
tags necessary have the same height. Height can vary.
推荐答案
这是它的核心:
编辑:我是要肉身出来更多,但rsp也打败了我。
I was going to flesh it out more but rsp beat me too it.
这篇关于溢出隐藏的jQuery选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!