Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="71 - Aparecer-Desvanecer" />
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
    <p>Aparecer y Desvanecer un elemento</p>
    <div id="laCapa"></div>
    <button id="aparecer">Aparecer</button>
    <button id="desvanecer">Desvanecer</button>
    <button id="fade03">Opacidad hasta .3</button>
    <button id="fade10">Opacidad hasta 1.0</button>
</body>
</html>
 
div#laCapa {
  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() {
    $("#aparecer").click(function() {
        $("#laCapa").fadeIn(300);
    });
    $("#desvanecer").click(function() {
        $("#laCapa").fadeOut("normal");
    });
    $("#fade03").click(function() {
        $("#laCapa").fadeTo("slow", 0.3);
    });
    $("#fade10").click(function() {
        $("#laCapa").fadeTo("slow", 1.0);
    });
});
Output

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

Dismiss x
public
Bin info
aitormedran0pro
0viewers