[jQuery] Element visible?

[jQuery] Element visible?

Hi all,
I am looking for a JQuery-way to know, if a block element (div etc.) is
visible on a page. What I mean is the viewport, the clipping a user can
see without scrolling the page.
Ideally, it would work like this:
$('#mydiv').turnsVisible(function(){
$(this).load(...);
});
So, if a user scrolls down and "mydiv" gets visible, the callback
function gets executed (but only once).
Has someone done something like this before or can give me a hint, where
to start?
Thanks and greetings,
Arash
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/