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/2.0.2/jquery.min.js"></script>
<meta charset=utf-8 />
<title>Demo by Roko C.B.</title>
</head>
<body>
  
  <div id="sky">
    
  <div class="cloud"></div>
    
  </div>
  
  
</body>
</html>
#sky{
  position:relative;
  height:300px;
  overflow:auto;
  background:#adf;
}
.cloud{
  position:relative;
  border-radius:100%;
  background:#fff;
  height:40px;
  width:300px;
}
 
(function loopCloud(){
  $(".cloud").animate({top: (this.offsetTop>0?'-=':'+=')+ 20}, 3000, "linear", loopCloud);  
})();
Output 300px

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

Dismiss x
public
Bin info
roXonpro
0viewers