jquery - find next instance of class from clicked table row -


Trying to show a hidden element when clicking on a table row In each row, the name of the same class Is an example, but I want to show only one click on one line. Here is the html structure

  & lt; Table id = "work-table" & gt; & Lt; TR & gt; & Lt; TD & gt; 1 & lt; / TD & gt; & Lt; TD & gt; 2 & lt; / TD & gt; & Lt; Td> & Lt; Span class = "icons" & gt; ICON & lt; / Span & gt; 3 & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; 1 & lt; / TD & gt; & Lt; TD & gt; 2 & lt; / TD & gt; & Lt; Td> & Lt; Span class = "icons" & gt; ICON & lt; / Span & gt; 3 & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; 1 & lt; / TD & gt; & Lt; TD & gt; 2 & lt; / TD & gt; & Lt; Td> & Lt; Span class = "icons" & gt; ICON & lt; / Span & gt; 3 & lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt;   

Here is jquery

  $ ('# task-table'). ('Click', 'tr', function () {$ (this) .next ('symbol'). Show ('sharp');}); Can anyone help me?     

.next tr after siblings Will see. Therefore, .next ('tr') will give you results, but you can not do whatever you like. What do you want:

  $ (this) .find ('. Icons'). Show ('Sharp');   

Bela working:

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -