0
   

show image on click button

 
 
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>
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 501 • Replies: 0
No top replies

 
 

Related Topics

 
  1. Forums
  2. » show image on click button
Copyright © 2019 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 03/20/2019 at 09:05:22