Reply
Sun 1 Jan, 2017 07:21 am
i want to use button tage to hide and show image.
atried this in <p> tag
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#hide").click(function(){
$("p").hide();
});
$("#show").click(function(){
$("p").show();
});
});
</script>
</head>
<body>
<img src="http://essamothman.neocities.org/sam.png">
<button id="hide">Hide</button>
<button id="show">Show</button>
</body>
</html>