jquery find span with Numbers and hide it -
how can second li list , find in span class "txtlist" contains numbers, , hide it?
<ul id="addresslist">      <li>title</li>      <li>         <span class="txtlist">full name</span>          <span class="txtlist">065632645454</span>      </li>         <li>         <span class="txtlist">usa</span>          <span class="txtlist">df sdfsdf g</span>      </li>   </ul>   thank you!
concept behind is, if try convert string can convertible number not return nan while using + conversion.
try,
$('ul li:eq(1) span.txtlist').filter(function(){   return !isnan(+$(this).text()); }).hide();   
Comments
Post a Comment