I'm using jquery DataTables, and I have a table with cells, each <td>
contains a <span>
and a hidden <select>
, now all I want is to filter on just the text inside the <span>
not the whole content of the <td>
which also contains the hidden <select>
element.
I'm using basic DataTables configuration:
$(document).ready( function () {
$('#table_id').DataTable();
} );
I've been trying for a couple of days now on this site, Datatables site , googling, but couldn't find an answer, so please help Thanks in advance
The code is generated on server, but the resulting table is something like this:
Please notice that: <select>
element is hidden with css
<tr>
<td>
<span>Text</span>
<select>
<option>option1</option>
<option>option2</option>
....
</select>
</td>
<td>
<span>Text</span>
<select>
<option>option1</option>
<option>option2</option>
....
</select>
</td>
</tr>
...