dataTables imn filename上的fnFilter列

CSS*_*eau 6 regex jquery datatables

我正在尝试根据标记的src属性中的图像文件名过滤列.

我的行看起来像这样:

<tr class="unread odd">
    <td class=" "><input type="checkbox" name="r28416" value="1"></td>
    <td class=" "><img src="img/icons/bullet_yellow.png" alt="A" title="A"></td>
    <td class="nw ">Non-Lu</td>
    <td class=" "><a class="fancybox" href="tpl/laboratoires/details.php?id=28416">J9121702</a></td>
    <td class=" ">Data</td>
    <td class=" ">378192</td>
    <td class=" ">John Doe</td>
    <td class=" ">DOEJ54161235</td>
    <td class="nw  sorting_1">2012-07-12 12:02</td>
    <td class=" ">0</td>
    <td class=" ">40</td>
Run Code Online (Sandbox Code Playgroud)

我正在使用这一行作为过滤器:

table.fnFilter( "bullet_yellow", 1 );
Run Code Online (Sandbox Code Playgroud)

其他所有列都有效,我对其他列有不同的过滤器.只是不适用于这一个.有什么想法吗?

小智 0

也许尝试将 src 放入隐藏列中,然后使用该列进行排序/过滤。我必须对不同的列进行排序,因为我的第二列已转换为图像。

aoColumns: [
{"sType": "html", "bSortable": true},
{"iDataSort": 2, "bSortable": true, "bUseRendered":false},
{"bVisible": true, "sType": "numeric"}
]
Run Code Online (Sandbox Code Playgroud)