Jump to: navigation, search

JQuery Mouse Double Click

From w3cyberlearnings

Contents

jQuery Mouse Double Click Event

jQuery mouse double click event handler.

Syntax

   $('#double_btn').dblclick(function(){
                    $('#mycontent').fadeOut();
     });

Example

<html>
    <head>
        <title>Double Click</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript" src="jquery.min.js"></script>
        <style>
            #mycontent{
                width:150px;
                height:150px;
                background-color:blue;
            }
        </style>
        <script>
            $(document).ready(function(){
                $('#single_btn').click(function(){
                    $('#mycontent').animate({height:180},"slow");
                    $('#mycontent').animate({width:180},"slow");
					
                });
                $('#double_btn').dblclick(function(){
                    $('#mycontent').fadeOut();
                });
                
            });
        </script>
    </head>

    <body>
        <button id="single_btn">Single</button>
        <button id="double_btn">Double</button>

        <div id="mycontent">
            Good to know everything like that!
        </div>
    </body>
</html>

Related Links


jQuery Mouse Double Click

Navigation
Web
SQL
MISC
References