javascript - Select appropriate tr in table - jquery -


how can select tr tag containing usdtry value in second td , change value tryusd using jquery?

<table class="k-selectable" cellspacing="0" role="grid" data-role="selectable"> <tbody>     <tr role="row" data-uid="9d1c0ae7-ec5d-4377-ad61-9eace8158802">         <td role="gridcell">             <img src="/images/up.png">         </td>         <td role="gridcell">usdtry</td>         <td role="gridcell">1.30514</td>         <td role="gridcell">1.30527</td>     </tr>     <tr class="k-alt" role="row" data-uid="0ff48da9-2019-4cf8-b631-a09c3ce98d63">     <tr role="row" data-uid="2c9ae0ba-c744-4bbb-9a23-fd15a3b65b6c"> </tbody> 

you use snippet:

$('td[role="gridcell"]:contains("usdtry")').text('tryusd'); 

demo


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -