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

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -