Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <label>zero</label>
  <label>one</label>
  <input id="substance">
  <label>two</label>
  <label>three</label>
  <input name="atc_code">
  <script>
    $('input#substance, input[name="atc_code"]').map(function() {return $(this).prevAll('label:first')[0]}).css("color", "green");
  </script>
</body>
</html>
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers