Can i hide text in a DIV after a number of characters with jQuery?
So far I think it would go something like this - jQuery would cycle through the text until it gets to a certain number of characters. It would then wrap a DIV from that position to the end of the text which could then be hidden with the hide() method. I'm not sure how to insert that wrapping text.
Any other way around this would also be appreciated.
Thanks.
This will hide a part of the text
I am replacing my original answer with this one.....
I think the purpose can be solved much more easier way than explained above
The above jquery code will hide div text if it exceeds 10 characters as well as ads ... at the end to explain that there is something more.
Jeff I was having the same issue wanted to add the text limiter to a dynamic content so here is my solution:
If you put a onkeydown event handler on the body tag you can then count the length in the div of interest, and then you can hide it when done, and remove your event handler.