jquery 截断插件
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:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我假设您已经拥有最新版本。
这里还有一些可能会有所帮助。但无法评论它们的适用性:
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/
Badonkatrunc 以非破坏性方式支持嵌套内容。
(全面披露:我是该插件的开发者。)
Badonkatrunc supports nested content in a non-destructive manner.
(Full disclosure: I am the developer of the plugin.)
截断插件很好,但就我的使用而言,它不能很好地处理 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