I'm trying to implement something to limit the size of a <li>
. The function is that you can write an article with n characters but it should be displayed only 500character then I want to put a button like read more.
For the moment I have the button who comes if the text is 500characters but I can't find how to limit the size...
Someone could give me advices ?
You can always use substring to get only a subset of chars entered and redisplay that on mouseover
On MouseOver use substring to change text inside li tag.
var myLi = $('#your-li-id');
myLi.text(myLi.text().substring(0,500))
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments