I'm using bootstrap datatables in codeigniter project in footer i included this datatables js and initialized like
$('.datatable').dataTable({
"sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span12'i><'span12 center'p>>",
"sPaginationType": "bootstrap",
"oLanguage": {
"sLengthMenu": "_MENU_ records per page"
}
} );
Now i want custom filters in required list page on required column i tried as
<select id="s" name="s">
<option value="1">Hyd</option>
<option value="2">Warangal</option>
</select>
and js as
<script>
$(document).ready(function(){
$('#s').change( function() {
//alert($(this).val());
oTable.fnFilter( $(this).val(), 2 );
} );
});
</script>
I want to filter using drop downlist for city.