I want to, using JavaScript, chop the given text to fit the object in which the text resides and add “…” at the end.
For example:
JavaScript got data from 3rd party web service and needs to put the text into 200 x 300 px div. Text’s length vary, so let’s say it will take much more space than provided.
How to determine at which point text will break through the border and prevent that by chopping text and adding “…” at the end?
There are several jQuery plugins that can do this.