Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

687
Visualizações
Change DataTable Search Label

Been trying to change the Search: to Filter: in my datatable that I created.

I tried this that i found:

$(document).ready(function() {
oTable = $('#datatable-example_filter').dataTable({
  "aaSorting": [[ 10, "desc" ]],
  "bJQueryUI": true,
  "aLengthMenu": [[25, 50, 100, 250, 500, -1], [25, 50, 100, 250, 500, "All"]],
  "sPaginationType": "full_numbers",
  "oLanguage": {
    "sSearch": "Filter: "
  }
});
} ); 

but it is not working, #datatable-example_filter is the name of the id, inside the div that is generated by dataTable

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

The other answer that uses "oLanguage" is using legacy DataTables api. According to DataTables v 1.10+ documentation, the syntax is:

$('#example').dataTable( {
  "language": {
    "search": "Filter records:"
  }
} );
over 4 years ago · Santiago Trujillo Relatório

0

very easy, just put this parameter when you call data table function:

"oLanguage": {
  "sSearch": "<span>YOUR SEARCH TITLE HERE:</span> _INPUT_" //search
}
over 4 years ago · Santiago Trujillo Relatório

0

Inside the Datatable Javascript (table = $dataTable.DataTable) add the following code:

language: {
  'search' : '' /*Empty to remove the label*/
}

I left the search empty because I wanted the info to be in the Placeholder

Ps: If you want to add a placeholder put the following code outside the Datatable initialization

$('.dataTables_filter input').attr("placeholder", "Zoeken...");
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda