Javascript Ajax jQuery Html PHP Example Quiz New MORE
Need a Website Or Web Application Or Any Help.Contact Us: +91 9437911966 (Whatsapp) Note: Paid Service

jQuery dblclick() Method

jQuery click event occurs when you double-click on an html element. It can be a button, span, div, hyperlink and paragraph.

It is an inbuilt function of jQuery.

jQuery dblclick() Method Syntax
$(selector).dblclick(function(){
//block of code that runs when the click event triggers
});

Example:

	<!DOCTYPE html>
	<html>
	<head>
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
	<script>
	$(document).ready(function(){
	  $("button").dblclick(function(){
		alert("The button was double-clicked two times.");
	  });
	});
	</script>
	</head>
	<body>

	<button>Double-click on this Button.</button>
	</body>
	</html>