Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery truncate plugin

Is there a jquery truncate plugin that doesn't have trouble with HTML in the content?

For instance this plugin does not handle HTML well:

http://www.reindel.com/truncate/

like image 466
Jourkey Avatar asked Jan 06 '10 04:01

Jourkey


3 Answers

I'm assuming you've got the most recent version.

There's a couple more here which might may help. Can't comment on their suitability, though:

http://github.com/jsillitoe/jquery-condense-plugin/tree

http://code.google.com/p/jquery-text-truncate/

like image 74
James Wiseman Avatar answered Sep 21 '22 12:09

James Wiseman


Badonkatrunc supports nested content in a non-destructive manner.

(Full disclosure: I am the developer of the plugin.)

like image 36
Joel Day Avatar answered Sep 18 '22 12:09

Joel Day


Truncate plugin is good, but for my use it didn't handle p tags well enough for the read more link to reside inline.

I found success with this one: http://henrik.nyh.se/2008/02/jquery-html-truncate

like image 20
chrisboardman Avatar answered Sep 21 '22 12:09

chrisboardman