$("element").dblclick(function(){
.....
})
Here is the code to show how to execute double click of a button.
<script>
$(document).ready(function() {
$("#b1").dblclick(function(){
$("#t1").html('You Double clicked the button');
});
})
</script>
<script>
$(document).ready(function() {
$(".edit_class").dblclick(function(){
/// your code for click event here ///
});
})
</script>
Once the event is fired then we can find out which button is clicked by the user.
<script>
$(document).ready(function() {
$(".edit_class").dblclick(function(){
var id = $(this).attr('id');});
})
})
</script>
$('#b1').bind('click dblclick', function(){
// Your code here
});
How to identify which event has triggered ?
$("#b1").on('dblclick click',function(e){
$("#t1").html('Your type of Click event : '+e.type);
});
DEMO : Which event has triggered
Single Click EventDEMO of Double Click Event
Most Popular JQuery Scripts | |
1 | Two dependant list boxes |
2 | Calendar with Date Selection |
3 | Data change by Slider |
4 | Show & Hide element |