javascript - Drilling down many levels (children and decendants) with jquery to get text -


trying drill down , name within table element. have id name table. best way of drilling down great-great nesting element desired span, , text ins?

html

....<ins id="target"></ins>...  <table id="names">       <tbody>       <tr>...</tr>       <tr>           <td>..</td>           <td>..</td>           <td>               <img />               <button>...</button>               <span>text get</span>           </td></tr></tbody></table> 

incomplete jquery:

$(document).ready(function() { $("#target").text($("#names>tbody>???drilldown???).text()); }); 

try $("#names").find('span').text();

check demo here jsfiddle


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -