Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-git2.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <ul id="list">
    <li><a href="http://google.com/">Google</a></li>
    <li><a href="http://yahoo.com/">Yahoo</a></li>
    <li>Not a link</li>
    <li><a href="http://live.com/">Live</a></li>
    <li>Not a link</li>
  </ul>
  
</body>
</html>
 
$(function() {
  
  $('#list > li:not(:has(a))').css({'background': 'red'});
  
});
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers