I have a table row with 5 cells.
I want to click an image in the last cell, and get the text value from a radio button in the first cell.
Can somebody tell me jQuery command I need?
I’m currently doing it like :
// when the image is clicked
alert($(this)[0].parentElement.parentElement.children[0].childNodes[1].innerText);
but something tells me this is a bit too verbose to be correct.
any ideas?
Thanks
Dave
Markup would be good to know here, radio button: are there more than one? Just need the selected one if so? You might use the selectors like:
checked one:
first column checked one: