Jquery: Counting Visible Elements - Efficiency/speed Problems
I have some code that works fine but it's become too slow: HTML: I have a container that contains about 50 ul elements. Each ul element has a h4 heading followed by a series of li
Solution 1:
I suspect that determining if an element is visible or not is quite expensive. Consider instead adding and deleting a class to hide or show elements. Then you can select them directly based on the class, which will mostly be supported by a host getElementsByClassName or querySelectorAll method.
Post a Comment for "Jquery: Counting Visible Elements - Efficiency/speed Problems"