I have a series of links in tabular format, all connected with different ids. I need to prevent the double clicking of them to prevent the double execution of associated server code. However the user can click different links. I say this because I have come across the following solution:
$("a.button").one("click", function() {
$(this).click(function () { return false; });
});
Which I believe stops clicking for the whole page, once one link is clicked which is too powerful. I like the class binding approach with the above, but a user should be able to click (singularly) any link.
Thoughts appreciated. Thanks.
EDIT
Currently trying:
<a class="dblclick" href="....
and
<script type="text/javascript">
$("a.dblclick").dblclick(function (e) { return false; });
</script>
But does not seem to work. I am using Mozilla.