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/jquery.min.js"></script>
<meta charset=utf-8 />
<title>Test Page</title>
<style>
  body {
    font-family: sans-serif;
  }
</style>
</head>
<body>
  <div class="my_div">a</div>
  <div class="my_div">b</div>
  <div class="my_div">c</div> 
  <div>other</div>
</body>
</html>
 
jQuery(function($) {
  
  $("div.my_div:not(:last)").css({
    color: "#090"
  });
  
  function display(msg) {
    $("<p>").html(String(msg)).appendTo(document.body);
  }
  
});
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers