javascript - Find whether a child node has a particular class using jQuery -


i have table row:

<tr>    <td class>1</td>    <td class="check">2</td>    <td class>3</td> </tr> 

i have variable x access above code, x.parentelement.

how can find out column <td> tag (the first, second or third) contains class check?

it seems me it's just:

$(x.parentelement).find('.check').text(); 

assuming x.parentelement dom element. here, find first child of dom element has "check" class , return text data.


Comments

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -