Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" 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;
  }
  #container {
    background-color: #eee;
  }
</style>
</head>
<body>
  <p>Click anywhere in the shaded container:</p>
  <div id="container">
    <p>Child that will fade</p>
    <p>Another that will fade</p>
    <p class="previewTitle">previewTitle - won't fade</p>
    <p>Another that will</p>
    <p class="previewBody">previewBody - won't fade</p>
    <p>Another that will</p>
  </div>
</body>
</html>
 
jQuery(function($) {
  
  $("#container").click(function() {
    $(this)
      .children(":not('.previewTitle, .previewBody')")
      .fadeTo("slow", "0.2");
  });
  
  function display(msg) {
    $("<p>").html(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