Reputation: 1126
Windows 8 IE browsers i am unable to prevent the double click.
$('#id').click(function (el)
{
if (!el.detail || el.detail == 1)
{
$.ajax({
...........
});
}
});
this above code working fine in Windows XP and windows 7 for prevent double click. But in windows 8 "el.detail" was not supported. Please help me to solve this problem.
Upvotes: 0
Views: 161
Reputation: 388316
Based on the comments, what you need to do is to prevent the ajax request being sent while another one is in progress
$('#id').click(function (el){
var $this = $(this);
if (!$this.data('inProgress')){
$this.data('inProgress', true)
$.ajax({
}).always(function(){
$this.data('inProgress', false)
});
}
});
Upvotes: 1