<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#button1").click(function(){
$("p").hide();
});
$("#button2").click(function(){
$("p").show();
});
});
</script>
</head>
<body>
<p>If you click on the "Hide" button, I will disappear.</p>
<button id="button1">Hide</button>
<button id="button2">Show</button>
</body>
</html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#button1").click(function(){
$("p").hide();
});
$("#button2").click(function(){
$("p").show();
});
});
</script>
</head>
<body>
<p>If you click on the "Hide" button, I will disappear.</p>
<button id="button1">Hide</button>
<button id="button2">Show</button>
</body>
</html>
Comments
Post a Comment