最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Fastest jQuery autoellipsis plugin? - Stack Overflow

programmeradmin7浏览0评论

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.

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.

Share Improve this question edited Aug 5, 2012 at 3:01 jeff 8,3482 gold badges34 silver badges43 bronze badges asked Aug 4, 2012 at 22:57 Mahdi GhiasiMahdi Ghiasi 15.3k19 gold badges77 silver badges121 bronze badges
Add a ment  | 

4 Answers 4

Reset to default 8

This JsPerf (http://jsperf./truncate-vs-dotdotdot/4) pares 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.

Trunk8 is a great bundle for this.

what about AutoEllipsis.jquery ?

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

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

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./rmorse/AutoEllipsis

发布评论

评论列表(0)

  1. 暂无评论