Last active
August 29, 2015 14:04
-
-
Save imjaypatel/faf3438f543de9ebe364 to your computer and use it in GitHub Desktop.
Hide Show <p> tag in JQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<script> | |
$(document).ready(function(){ | |
$("#hide").click(function(){ | |
$("p").hide(); | |
}); | |
$("#show").click(function(){ | |
$("p").show(); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<p>If you click on the "Hide" button, yes I will disappear.</p> | |
<button id="hide">Hide</button> | |
<button id="show">Show</button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment