Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81992

filtering based on a column with images in it

$
0
0
Hey guys so I am trying to do some custom filtering.
I have some checkboxs and depending on which ones are selected I would like to generate a regex string that I can apply on a column:
Here is my javascript:
$('.dataTable').dataTable({
"bJQueryUI": true,
"aoColumns": [
/* ID */
{
"bVisible": false
},
/* Type */{"sClass": "centerImage" },
...
});

When I click the filter button I run this:
function applyFilter() {
var filterString = "";
$('.filteringCheckBox').each(function () {
if ($(this).prop("checked")) {
if (filterString.length > 0) {
filterString += "\|";
}
filterString += $(this).val();
}
});
$('.dataTable').each(function () {
$(this).dataTable().fnFilter(filterString, 1, true, false);
});
}

The problem is that because an image is displayed I never get any matches. What do I have to do?

Viewing all articles
Browse latest Browse all 81992

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>