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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -