Double Click Event


Double Click here to display alert





Sourcode

    Try It Yourself
 
<html>
<head>


<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />


<script type="text/javascript" language="Javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

</head>
<body>

<h2>Double Click Event</h2>
<hr />

<p id="MyPara" style="background-color:Yellow;color:Red;font-size:2.2em;">
Double Click here to display alert
</p>
<br /><br />

<script language="javascript" type="text/javascript">
    $(document).ready(function () {

        $("#MyPara").dblclick(
            function () {
                ShowAlert();
            }
        );

    });


    function ShowAlert() {
        alert("Alert message on double click");
    }
</script>


</body>
</html>
Share with your friends!!