Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>JS Bin</title>
  </head>
  <body>
    <div id="box" class="blue"></div>
    
 
    <div>
      <button>Slide Box Up</button>           
    </div>
  
 
    <script src="https://code.jquery.com/jquery-3.1.0.js"></script>
  </body>
</html>
 
#box {
  width: 100px;
  height: 100px;
  border: 1px solid black;
}
.blue {
  background-color: blue;
}
button {
  margin-top: 10px;
}
 
$(() => {
  
  $("button").click(() => {
    // slide #box element up with duration of 2 secs
    $("#box").slideUp(2000)
  })
})
Output

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

Dismiss x