jQuery: Count number of visible divs

 $("div:visible").length  
 or  
 $("div:visible").size()  

If we need for a specific 'class', then

 $(".myclass div:visible").length  
 or  
 $(".myclass div:visible").size()  

No comments:

Post a Comment

Python contextlib for Timing Python code

If you've ever found yourself needing to measure the execution time of specific portions of your Python code, the `contextlib` module o...