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

98
Visualizações
Jquery trying to add a text input to each column header in Table

Trying to get it to append a text input to display below the header span but it seems to be doing some wonky stuff -

It appears to not be doing it. I have written this once in C# and I am currently having to basically port it over to ClietnSide due to some bugs that can only be fixed using clientside.

https://jsfiddle.net/fgtzjbLu/

 var $input = $("<input/>", {
            type: "text",
                       
            placeholder: "Column Filter"
        }); 
 $tr.append("<th>" + "<span>" + colHeader[i] + '</span>' + '<br />').append($input.clone()).append("</th>");
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I have figured it out -

After the table is completed I have run the following code to insert the textbox into each column header.

 var tid = 10;
    var $input = $( "<input/>", {
        type: "text",
        id: id+tid + "TXTSEARCH",
        placeholder: "Filter",
        'class': 'SearchTextBox',
    });  
   
    $($table.find('th')).each(function () {
  
        $input.clone().prop('id', id + tid + "TXTSEARCH",'placeholder',"Column Search").appendTo($(this));
        tid++;
    })

https://jsfiddle.net/u8fjo2gv/

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