jquery 数据表插件似乎没有正确对带有链接的列进行排序 [英] jquery datatable plugin doesn't seem to sort columns with links properly

查看:25
本文介绍了jquery 数据表插件似乎没有正确对带有链接的列进行排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一列是纯文本,排序工作正常,但是当我将列数据更改为 HTML 常规链接时,排序似乎非常随机且破碎.我在网站上找不到关于此问题的任何其他文档.

I have a column that was pure text and the sorting worked fine but when I change the column data to HTML regular links, the sorting seems quite random and broken. I couldn't find any other documentation on this issue on the site.

http://www.datatables.net/usage/features

有什么建议吗?

推荐答案

使用 sSortDataType 和 sType(值为 html)将列标记为包含 HTML 并在排序前将其删除.页面上的文档.

Use sSortDataType and sType (with value html) to notate the column as containing HTML and remove it prior to sorting. Docs on the Columns page.

这篇关于jquery 数据表插件似乎没有正确对带有链接的列进行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆