javascript - Take particular value from the variable having html -


  1. below script taking closest sibling value

    var owner = $(this).closest('td').siblings('td.select_fly').html();

  2. 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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -