How to limit the number of characters using Jquery

Limit the characters count (Characters count) using Jquery

In some cases we have to limit the number of characters in text contents(heading, paragraph). Additionally We can add […] which tells the user corresponding word/sentence is not completed.


//Limit the characters count to 55.
$(this).text($(this).text().substr(0, 55));

//adding [...] at then end of word
$(this).append('...');

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *