Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="71 - Animacionesc" />
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <p>Animaciones</p>
  <div id="laCapa">Anímame un poco!</div>
  <button id="derecha">Crecer a la derecha</button>
  <button id="texto">Texto grande</button>
  <button id="mover">Mover la capa</button>
  <button id="todo">Todo</button>
</body>
</html>
 
div#laCapa {
  position: relative; 
  width: 250px; height: 180px; margin: 10px; padding: 20px;
  background: blue; border: 2px solid black; cursor: pointer;
}
p, span {
  font-size: 16pt;
}
button {
  margin: 5px;
}
 
$(function() {
    $("#derecha").click(function() {
      $("#laCapa").animate({ width: "500px" }, 1000);
    });
    $("#texto").click(function() {
      $("#laCapa").animate({ fontSize: "24pt" }, 1000);
    });
    $("#mover").click(function() {
      $("#laCapa").animate({ left: "500" }, 1000, "swing");
    });
    $("#todo").click(function() {
        $("#laCapa").animate({ width: "500px", fontSize: "24pt", left: "500" }, 1000, "swing");
    });
});
Output 300px

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

Dismiss x
public
Bin info
aitormedran0pro
0viewers