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

248
Visualizações
How to manipulate the DOM with Datatables and change the search box position

I've been reading the official documentation and trying to understand how to change the location of the default search box with DOM manipulation but I couldn't make it work.

LIVE DATATABLE DEMO

So basically what I want is to change the location of the search box and place it within the <input title="Search"... code keeping the same features.

I though this would do the trick, but it doesn't:

"dom": '<"#search"f>'

Any help would be appreciated.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can hide the search field with

dom: 'lrt'

and then you need to activate the search from your field with

// I have added id="search" to your search field to make it easier
$('#search').on('input', () =>
{
    DT1.search($('#search').val()).draw();
});

Here is the working fiddle

http://live.datatables.net/vepedopa/3/edit

about 4 years ago · Juan Pablo Isaza 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