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

74
Views
Llegar a datos específicos en jQuery

Estoy tratando de agregar la capacidad de cambiar el contenido de una de las columnas en la tabla de datos (sus celdas de datos deben ser editables). Estaba usando este tutorial como referencia:

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

su código fuente: https://github.com/divanov11/table-edit-backend

Y así, tengo las siguientes funciones en mi plantilla:

 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); }

Después de escribir, por ejemplo, "chipset", obtengo el siguiente valor de description :

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

Necesitaría que el valor de la description sea solo "chipset". ¿Cómo lograr eso?

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!