In the below code
var panel= '<div id="title" style="display:inline;font-size:150%;color:white;background:transparent;text-transform: none;width:150px;"> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</div>
<div name="images" id="name" style="display:inline;position: absolute; margin-left: auto;margin-right:auto;left: 0;right: 0;width:350px;height: 100px;"><img src="1"><img src="2"><img src="3"><img src="4"></div>
<div id="name"> bbbbbbbbbbbbbbbbbbbbbbbbbbbbb</div>
How to truncate the id fields title and name and show only 10 characters and next two characters must be .. if at all there is any character/
Thanks.
You can do something like this using
.text():I’d check if it’s 12 or more characters because you’re adding 2.
Otherwise this:
12345678901renders as1234567890..which is longer than what was there to begin with.