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

185
Visualizações
Format results from bootstrap datetimepicker v4

I am using the following code:

$(document).ready(function () {   
    
            $('#myInput').datetimepicker({
                format: 'YYYY-MM-DD',
                
            });

            $('#myInput').on('dp.change', function (e) {
                var rex = new RegExp($(this).val(), "i");
            $("#actividades_curso tr").hide();
            $("#actividades_curso tr").filter(function () {
                return rex.test($(this).text());
            }).show();
            $(".noResults").hide();
            if ($("#actividades_curso tr:visible").length == 0) {
                $(".noResults").show();
            }
            });  
        });

The filtered results are ok but are shown without any css and the original table headers are gone. I'm new to javascript. Is there a way to format/apply css to the results?

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

0

Just for the purpose of this small function i got the results filtered by the '.filter()' method and keep everything with the style of the original table by just changing the 'area' of action of the filter method, in other words i changed the id ('#myTable') for the id of the body of my table, i have learnt to use fiddle js.

$('#ohbudy tr').filter( function(){ return rex.test($(this).text()); }).show();

https://jsfiddle.net/e6g1ucvn/

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