To attach double click event to an element, dblclick()
method can be used that fires when the element is double clicked.
<script>
$("#btnDblClick").dblclick(function () {
alert("dblclick event called");
});
</script>
Above code snippet find html element whose id is "btnDblClick" and attaches dblclick event. When this element is double clicked, the attached function executes that shows "dblclick event called" message in the JavaScript alert box.
Views: 6343 | Post Order: 63