show ,hide and toggle effects using jquery

show ,hide and toggle effects using jquery
This is a basic jquery for show() ,hide() and toggle() functions that are bind to onclick litsner . just copy and place the code inside some text editor and save as .html and you should be able to see the output.

<!DOCTYPE html>
<html>
<head>
    <title>jQuery Showing and Hiding an Element</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript">
        $(function() {
            $("#show").click(function() {
                $("#theDiv").show("normal");
            });
            $("#hide").click(function() {
                $("#theDiv").hide("normal");
            });
            $("#toggle").click(function() {
                $("#theDiv").toggle("slow");
            });
        });
    </script>
    <style type="text/css">
        div#theDiv {
            width: 250px;
            height: 180px;
            margin: 10px;
            padding: 20px;
            background: blue;
            border: 2px solid black;
            cursor: pointer;
        }
        p, span {
            font-size: 16pt;
        }
        button {
            margin: 5px;
        }
    </style>
</head>
<body>
    <p>
        Showing and Hiding an Element</p>
    <div id="theDiv">
    </div>
    <button id="show">Show</button>
    <button id="hide">Hide</button>
    <button id="toggle">Toggle</button>
</body>
</html>