Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

jQuery Bind Double Click Event to Button Control

Nov 23, 2012
Introduction
  
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.

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.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email

4 comments :

Anonymous said...

gud job

Anonymous said...

please post more examples

madhu356 said...

Pls post latest Example

madhu356 said...

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..........

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.