jquery 截断插件

发布于 2024-08-17 02:49:58 字数 177 浏览 2 评论 0原文

是否有一个 jquery 截断插件,不会出现内容中 HTML 的问题?

例如,这个插件不能很好地处理 HTML:

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

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/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

彼岸花ソ最美的依靠 2024-08-24 02:49:58

我假设您已经拥有最新版本。

这里还有一些可能会有所帮助。但无法评论它们的适用性:

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

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

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/

孤云独去闲 2024-08-24 02:49:58

Badonkatrunc 以非破坏性方式支持嵌套内容。

(全面披露:我是该插件的开发者。)

Badonkatrunc supports nested content in a non-destructive manner.

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

乱了心跳 2024-08-24 02:49:58

截断插件很好,但就我的使用而言,它不能很好地处理 p 标签,无法让“阅读更多”链接驻留在内联。

我发现这个成功了: http://henrik.nyh.se/2008/ 02/jquery-html-截断

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文