Search code examples
jquerydatatable

jQuery DataTables - Remove search Label


I am using jquery datatable and I want to remove search text label before input and i have no experience with jquery how to remove search label ? please help me thanks.

enter image description here

Jquery datatable

$(document).ready(function() {
  $("#userTable").dataTable({
    columnDefs: [{
        "defaultContent": "-",
        "targets": "_all"
    }]
  });

//custom format of Search boxes
$('[type=search]').each(function () {
    $(this).attr("placeholder", "Search...");
    $(this).before('<span class="fas fa-search icon"></span>');
});
});

Solution

  • Try With this code:

    $("#dataTable").DataTable({
        language : { search : "" },
    });