jquery - How to select a specific tag content inside li tag? -


<ul id="listq">    <li><txt>part01</txt><from>part02</from></li>    <li><txt>part01</txt><from>part02</from></li> </ul>  $(document).ready(function() {   var list = $('#listq li');   $('#tv').html($(list).eq(0).text()); }); 

so, place "part01part02" inside #tv.
how can txt content inside #tv (part01 in case) ?

try jsfiddle

$('#tv').html($("#listq li:first txt").text()); 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -