i have this code to show a loading image when i run an ajax call:
$('.event').live('click', function () {
var spinner = $("<img src='/content/images/ajax-loader.gif' />").insertAfter(this);
the issue is that since its an async call, if you click a link multiple times, it will show up with multiple spinners. Obviously this is just the sympton as i dont want to allow another ajax call before the first one returns.
What is the best way to "disable" a link or a button during the window of an existing ajax call?