0

I was happy to find this function to shorten long text jQuery text truncation (read more style)

It requires an ID, but I want it to run on many elements with the same classname and without an unique ID.

How would it be possible?

http://jsfiddle.net/sCREz/1/

Community
  • 1
  • 1
Martin
  • 2,007
  • 6
  • 28
  • 44
  • 1
    You will have to change the `truncate()` function to process all the returned DOM elements with `.each()` or a `for` loop instead of just assuming there is only one returned DOM object like the code assumes now. – jfriend00 Apr 08 '12 at 19:15
  • Yes, but how? I tried like this: http://jsfiddle.net/sCREz/3/ – Martin Apr 08 '12 at 19:49
  • Nevermind. Using another plugin now. Thanks tho! – Martin Apr 08 '12 at 21:03

0 Answers0