How would I disable all links with the button class after they are clicked once? I\'d like to be able to do this in one place, and not have to change all of the
$("a.button").bind('click', function() { $(this).attr("disabled", "disabled"); });
$("a[disabled]").live('click', function() { return false; });
Does it. First line binds to all a-element with class button a function which sets (btw invalid for a-elements) disabled attribute to disabled.
Second function uses jQuery live event rebinding to bind "disabling" function to all future instances of a-elements which have and attribute disabled
Check jQuery Event documentation for more in-depth info on the two used functions if you want