I am trying to prevent multiple clicks on links and items, which is causing problems.
I am using jQuery to bind click events to buttons (jQuery UI) and image links (
You've got a couple of options:
If your buttons/links will reload the page, you can simply unbind the click event handler:
$('input:submit').click(fumction() {
$(this).unbind('click');
// Handle event here
})
You can disable the buttons, and re-enable them once you're done (I think
this should also work with ):
$('input:submit').click(function() {
$(this).attr('disabled', 'disabled');
// It also helps to let the user know what's going on:
$(this).val('Processing...');
// Handle event here
$(this).removeAttr('disabled');
})
I don't think this works on links though.