I originally wanted a submit to take place on a single click event:
$("#booking_Form #submit_Booking").bind("click", function(event){.....
I then found (obviously) that a double click led to a duplicate submission.
So I tried capturing and suppressing this with:
$("#booking_Form #submit_Booking").bind("dblclick", function(event){
return false;
});
But the single click event still fired twice.
Am I correct it thinking that if it is imperative that a double click does not submit twice that I must change the single click event to a double click event.
Or is there some global way to switch off double clicks.
You should use
.one(). That way all subsequent clicks will do nothingLink: http://api.jquery.com/one/
EDIT:
If you want to use
.one(), how about doing something like this…JAVASCRIPT:
DEMO:
http://jsfiddle.net/BKqm9/13/