Datatables - Changing search input field

Datatables - Changing search input field

BrekaloBrekalo Posts: 1Questions: 1Answers: 0
edited May 2016 in Free community support

I am using datatables in my project and I am trying to change search input field for my own search input field. But it is not filtering anything at the moment for me.

This is my code:

  var oTable = $('#table').DataTable({
     "paging": false,
     "ordering": false,
     "info": false,
     "dom": 'lrtip'
 });

$('#search').keyup(function(){
  oTable.search($(this).val()).draw();
})

And this is how my input field looks like:

 <input type="text" class="search-input" id="search" placeholder="Søk">

And my table element:

  <table class="display" id="table">
This discussion has been closed.