Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
  <style>
    .feed_expand {
      height: 10em;
      border: 1px solid black;
    }
    .feed {
      border: 1px solid black;
      margin-bottom: 3px;
    }
  </style>
</head>
<body>
  <div class="feed">
    <div class="clicker">Click me</div>
  </div>
  <div class="feed_expand">
    I'm the feed_expand, I have content
  </div>
  <script>
    $(".clicker").click(function() {
      $(this).closest(".feed").next(".feed_expand").slideUp(300, function() {
        $(this).empty();
      });
      
      // Show the expand again a second later
      var self = this;
      setTimeout(function() {
        $(self).closest(".feed").next(".feed_expand").slideDown();
        $("<p>").html("As we can see, the content in feed_expand has been removed").appendTo(document.body);
      }, 1300);
    });
  </script>
</body>
</html>
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers