Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
  <script src="http://code.jquery.com/jquery-git.js"></script>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <ul>
    <li>foo</li>
  </ul>
</body>
</html>
 
$(function(){
  console.log( $( "ul" ).find( "li:eq(0):contains(foo)" ).length );
  console.log( $( "ul" ).find( "li:eq(0)" ).filter( ":contains(foo)" ).length );
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers