Skip to content

Instantly share code, notes, and snippets.

@Richardtex22
Created March 8, 2019 00:12
Show Gist options
  • Save Richardtex22/ef5bec862ed8c4fd6c6e1349a56ad54f to your computer and use it in GitHub Desktop.
Save Richardtex22/ef5bec862ed8c4fd6c6e1349a56ad54f to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script>
$(document).ready(function(){
$("#b1").click(function(){
$("#secret").fadeIn("slow");
$("#secret").show("slow")
});
});
</script>
<script>
$(document).ready(function(){
$("#b2").click(function(){
$("#secret").slideDown("slow");
$("#secret").hide("slow")
});
});
</script>
<script>
$(document).ready(function(){
$("#b3").click(function(){
$("#secret").fadeToggle();
});
});
</script>
</head>
<body>
<p>Ejercicio 1</p>
<button id="b1">Click me to show a hidden secret!</button>
<button id="b2">Click to slide down</button>
<button id="b3">Click me to toggle a hidden secret!</button><br><br>
<div id="secret" style="display:none;">I am a hidden secret.</div><br>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment