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
Post a Comment