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>JS Bin</title>
</head>
<body>
  <div class="a"></div>
</body>
</html>
 
.a {
  background-color: green;
  width: 200px;
  height: 200px;
  -webkit-transition: all 200ms ease-in-out 0s;
}
.b {
  background-color: blue;
}
 
blinkTimes = 0;
function blink () {                           
  $('.a').toggleClass('b');
  blinkTimes --;
  if (blinkTimes > 0) {
    setTimeout(blink, 500);
  }
}
function startBlink() {
  //alert('?');
  blinkTimes = 4;
  blink();
}
$(document).click(function() {
  $('body').animate({ scrollTop: top }, '400', 'swing', startBlink);
});
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers