Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fastest jQuery autoellipsis plugin?

I'm looking for a jQuery autoellipsis plugin. (autoellipsis plugins will add ... at the end of a multiline text.)

I know these plugins: autoellipsis and dotdotdot. but both working slowly in my jQuery Mobile project.

What is the fastest jQuery autoellipsis plugin?

EDIT: I have to call autoellipsis plugin on window resize event.

like image 373
Mahdi Ghiasi Avatar asked Aug 04 '12 22:08

Mahdi Ghiasi


4 Answers

This JsPerf (http://jsperf.com/truncate-vs-dotdotdot/4) compares the following truncating/ellipsis plugins:

  • jquery dotdotdot 1.6.16
  • jquery truncate 1.4
  • autoellipsis 1.0.10
  • truncate.js v0.1.0
  • trunk8 v1.3.1

Those plugins are linked from the jsPerf. According to the results, the truncate.js out performs the rest.

like image 160
dooug Avatar answered Nov 12 '22 04:11

dooug


Trunk8 is a great bundle for this.

like image 21
CamelCamelCamel Avatar answered Nov 12 '22 06:11

CamelCamelCamel


what about AutoEllipsis.jquery ?

https://github.com/SmartMedia/AutoEllipsis/blob/master/autoellipsis.min.jquery.js 1.292 kb

and here's a live example for using it http://jsfiddle.net/abdullahdiaa/s6WB5/

like image 1
AbdullahDiaa Avatar answered Nov 12 '22 06:11

AbdullahDiaa


This is one that I rolled a while back, it supports multiple lines etc, I did have some "big" ideas for it but so far this has been useful enough as it is:

https://github.com/rmorse/AutoEllipsis

like image 1
rmorse Avatar answered Nov 12 '22 06:11

rmorse