I have a problem – please see a part of my code:
<ol>
<li>
<div class="qwerty">zxcvbnm</div>
</li>
<li>
<div class="qwerty">abc</div>
</li>
<li>
<div class="qwerty">poiuytrewq</div>
</li>
</ol>
I want to get all the elements using “qwerty” class and substr them to 3 characters + “…”.
So I want to get such results as below:
<ol>
<li>
<div class="qwerty">zxc...</div>
</li>
<li>
<div class="qwerty">abc</div>
</li>
<li>
<div class="qwerty">poi...</div>
</li>
</ol>
Any help would be appreciated. Many thanks,
You can use
textmethod:http://jsfiddle.net/NEJR4/