简体   繁体   中英

JQuery HTML Table Filter not filtering

I am using the example Individual column searching from DataTables.Net which works for the most part, however, I have two fields that it will not filter on.

I believe its down to there being a FontAwesome icon in the field too.

This is the HTML for one of the table columns that is not filtering, the other is virtualy the same so if i can get this one working, the other one should too.

<td class='ReportManager'>
    <span style='opacity: 0.349019607843137; font-size: 20px;'>
        <i class='fa fa-file-o'></i>
    </span></br>
    81
</td>

I suspect if I strip out the icon, this would work, but I need the icon in there, and for the filter to work.

Any and all help would be very much appreciated.

After scratching my head, and looking at this in a fiddle (where this annoyingly worked) I output the value that the filter was looking for, then compared against the html that was being written.

The JavaScript was looking for a <br> tag rather then a <br/> or <\\br> tag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM