T
T
Taras Parashchuk2018-03-13 11:55:19
JavaScript
Taras Parashchuk, 2018-03-13 11:55:19

Read the contents of the first cell of the row when clicking on the entire row of the table?

Hello.
Tell me how to read the contents of the first or Nth cell of the table when clicking on the entire row.

Here it is, but it works, but it gives out the value of the column when you click only on the first cell, but how to make it for the entire column. $(" table.table tr > td:first-child") .
bind( "click", function() { alert( $( this ).text());

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Ainur Valiev, 2018-03-13
@vaajnur

use collection traversal each or map

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question