[jquery] Different function for same class on 'click' / 'dblclick'
- by Shishant
Hello,
This are my two functions, on single click it works fine, but on dblclick both functions execute, any idea? I tried using live instead of delegate but still both functions execute on dblclick
// Change Status on click
$(".todoBox").delegate("li", "click", function() {
var id = $(this).attr("id");
$.ajax({
//ajax stuff
});
return false;
});
// Double Click to Delete
$(".todoBox").delegate("li", "dblclick", function(){
var id = $(this).attr("id");
$.ajax({
//ajax stuff
});
return false;
});