Any idea how to make this work? In the following example I need to know how many items fall inside/outside of the visible area. This can't be based on the height of the parent div because that will be variable eventually:
<html> <head> <title></title> <script type="text/javascript" src="jquery-1.3.2.js"></script> <script type="text/javascript"> $(document).ready(function(){ var cnt = $('#test_list li:visible').size(); alert(cnt); }); </script> <style> ul, li {padding: 0; margin: 0;} li {height: 20px;} </style> </head> <body> <div style="height: 100px; overflow: hidden;"> <ul id="test_list"> <li>Test</li> <li>Test</li> <li>Test</li> <li>Test</li> <li>Test</li> <li>Test</li> <li>Test</li> <li>Test</li> <li>Test</li> <li>Test</li> <li>Test</li> <li>Test</li> </ul> </div> </body> </html>