Jump to content

samo1234

Members
  • Posts

    1
  • Joined

  • Last visited

samo1234's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. hi i am not sure if this is the right place to place a new query of javascript code. but because i am new at this forum so bare with me? i have a code that have two buttons one hide the other show but what they do is to hide and show <p> tag is there a way to show and hide an image using this code <!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> <p> jj</p> <button id="hide">Hide</button> <button id="show">Show</button> </body> </html> thanks
×
×
  • Create New...