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-2.1.0.min.js"></script>
<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;
  }
  
</style>
</head>
<body>
  <p id="target" style="margin-top: 20px">AAAAeelh´flsakhalHFLskdhf</p>
</body>
</html>
 
jQuery(function($) {
  
  var target = $("#target");
  target.html(target.text().replace(/./g, "<span>$&</span>"));
  setTimeout(runAnimation, 0);
  
  function runAnimation() {
    var index, spans;
    
    index = 0;
    spans = target.children();
    doOne();
    
    function doOne() {
      var span = $(spans[index]);
      if (!$.trim(span.text())) {
        // Skip blanks
        next();
        return;
      }
      
      // Do this one
      span.css({
        position: "relative"
          }).animate({
        transform: "rotateX(6deg)"
      }, "slow").animate({
        transform: "rotateX(60deg)"
      }, "slow", function() {
        span.css("position", "");
        next();
      });
      //span.css({
      //  position: "relative"
     // }).animate({
      //  top: "-20"
      //}, "slow").animate({
      //  top: "0"
     // }, "slow", function() {
     //   span.css("position", "");
      //  next();
      //});
    }
    
    function next() {
      ++index;
      if (index < spans.length) {
        doOne();
      }
      else {
        setTimeout(runAnimation, 5000);
      }
    }
  }
  
});
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers