Hiding the Current HTML Element: ($(this).hide() )


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Testing</title>
              <script type="text/javascript" src="lib/jquery/jquery-1.3.2.js"></script>
              <script type="text/javascript">
                     $(document).ready(function(){
                           $("button").click(function(){
                                  $(this).hide();
                           });
                     });
              </script>
    </head>
    <body>
        <h2>This is heading</h2>
              <p>This is a paragraph</p>
              <button>Click Me</button>
    </body>
</html>

Comments

Popular posts from this blog

371 - Ackermann Functions

Create many folder with one click