Jump to content

samo1234

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by samo1234

  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>
    $(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...