Yes, there is a way. I will use the YUI API to illustrate my example. First, your text should be in some dom element, be it span, div, p or something else, it should be in the element. Here I will read the list item
var viewPortY = YAHOO.util.Dom.getDocumentScrollTop(), viewPortHeight = YAHOO.util.Dom.getViewportHeight(), i = 0,
So, essentially, I get all the dom objects that contain text that interests you. Then I scroll, and no matter who coordinates Y between the viewports Y and Y + ViewPort Height, I put in an array.
Zoidberg
source share