javascript - jquery length of characters in a collection -
Is there a way to get the length of the characters in the jQuery collection?
For example, you match a bunch of divs and you want to calculate the character of only matched divs
Yes ... you can do this,
var count = 0; $ ("Selector") .each (function () {count + = $ (this) .text (). Length;}); Warning (count); See here
Comments
Post a Comment