get count of class which is visible element code example Example: get count of class which is visible element $(".level1:visible").length;