Hi I want to be able to count the number of displayed characters in a Div with javascript/jquery. For example
This is my div!&l
Try this. I am trimming to avoid any white spaces in the content start or end.
$.trim($("#mydiv").text()).length
If you want to keep spaces also in the count then don't trim it just use this.
$("#mydiv").text().length