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>
    <title>jQuery Showing and Hiding an Element</title>
    <script src=""></script>
    <script type="text/javascript">
        $(function() {
            $("#show").click(function() {
            $("#hide").click(function() {
            $("#toggle").click(function() {
    <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;
        Showing and Hiding an Element</p>
    <div id="theDiv">
    <button id="show">Show</button>
    <button id="hide">Hide</button>
    <button id="toggle">Toggle</button>