Put specific tds from a table row into edit using jQuery (then update w/ ajax)
Posted
by bbqsauced
on Stack Overflow
See other posts from Stack Overflow
or by bbqsauced
Published on 2010-04-15T23:34:25Z
Indexed on
2010/04/15
23:53 UTC
Read the original article
Hit count: 199
I'm somewhat new to jQuery, so I could use some help here.
This is my issue:
I have a php script outputting a dynamic table. Each row has an "edit" button, plus some other fields. Only 3 of those need to be turned into an input box. The edit button should only put that specific row into "edit mode." I got as far as assigning each row a unique class by adding a number to the end of it.
I have been able to use jQuery to change all of the rows into edit mode, but I need it to be specific to a row.
An example row would have classes like name0, price0, and desc0. The next row would go on to classes name1, price1, and desc1 (for the fields that need changed). How can I reference these values and pass them to jQuery so it processes an event on just those elements?
© Stack Overflow or respective owner