using jQuery to find div that has class which contains this text -


i using find info , append elsewhere

$(data).find('.two_column_layout').has('b.warning').each(function (index, element) 

but need narrow down search specific text resides in b.warning area , example , have 50 tables , , need find ones have b.warning contains "this" or "this text" if needs match text ?

<table class="two_column_layout"> <tbody> <tr><td><b class="warning">this text</b></td></tr> <tbody> </table>  <table class="two_column_layout"> <tbody> <tr><td><b class="warning">not append info here</b></td></tr> <tbody> </table> 

i tried , didn't work , when remove :contains(this) , script finds b.warning again

$(data).find('.two_column_layout').has('b.warning:contains(this)').each(function (index, element) 

there no need include single quotes. include :contains in find()

$(data).find('.two_column_layout b.warning:contains(this)') 

Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -