Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

90
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!