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

70
Views
Getting to specific data in jQuery

I am trying to add an ability to change the contents of one of the columns in the data table (its data cells should be editable). I was using this tutorial as a reference:

https://www.youtube.com/watch?v=LbhVVN5ffi0

its source code: https://github.com/divanov11/table-edit-backend

And so, I have the following functions in my template:

function edit_description(place){
            var targetId = $(this).attr("id");
            var value = $(this).text();

            var targetIN = $(this).attr("identificationNumber");

            $(this).unbind();

            $(this).html(`<input class="description form-control" data-target="${targetId}" type="text" value=${value}>`);

            $(`.description`).on('keypress', function(e){
                if (e.which == 13) {
                    var target = $(this).attr("data-target");
                    var description = $(`#${target}`).text($(this).val());
                    save_description(description, targetIN);
                    return false;
            }
        })
        }

        function save_description(description, identification_number){
            console.log('Saved!');

            var user_input = {"identificationNumber":identification_number, "description":description};
            update_description_POST(user_input);

        }

After typing in for example "chipset" I get the following description's value:

<td identificationnumber = "1234" id="description-1234">chipset</td>

I would need the description's value to be just "chipset". How to achieve that?

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