Introduction:
Here I will explain how to bind or add double click event to button control in jQuery.
Here I will explain how to bind or add double click event to button control in jQuery.
Description:
In previous posts I explained jQuery increase decrease font size of website, Redirect to another page after some time delay, jQuery Change style of controls, Disable weekends in datepicker, Show multiple months in datepicker, and many articles relating to JQuery. Now I will explain how to bind double click event to button control in jQuery.
In previous posts I explained jQuery increase decrease font size of website, Redirect to another page after some time delay, jQuery Change style of controls, Disable weekends in datepicker, Show multiple months in datepicker, and many articles relating to JQuery. Now I will explain how to bind double click event to button control in jQuery.
To
add double click event we need to write the code like this
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>jQuery bind double click event to button control</title>
<script language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js">
</script>
<script type="text/javascript">
$(document).ready(function()
{
$('#btnClick').dblclick(function() {
alert('You
clicked Two Times');
})
})
</script>
</head>
<body>
<form id="form1"
runat="server">
<div>
<input type="button" id="btnClick" value="Click Two Times" />
</div>
</form>
</body>
</html>
|
Live Demo
To check live demo continuously press below button two times
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
|
|||
4 comments :
gud job
please post more examples
Pls post latest Example
Hi
Tell me solution for multiple click enable button.am post some text in textbox after am clicking post button is working but am clicking multiple time click in same button it will display same taxt in multiple times so i want when i click first time it will be enable and after 2nd time button click will be disable.
pls tell me solution..........
Note: Only a member of this blog may post a comment.