javascript - Take particular value from the variable having html -
below script taking closest sibling value
var owner = $(this).closest('td').siblings('td.select_fly').html();
following output of owner variable
now want take blr owner variable, can u please out :(
<p> flight 235 <span style="margin-left:50px;">blr</span> </p>
you can using find()
way:
$(owner).find("span").text();
or directly:
var spantext = $(this).closest('td').siblings('td.select_fly').find("span").text();
Comments
Post a Comment