lets say you have this code
$('a.clickers').live('click', function() {
///...
});
what you would like to do is single out elements when they are clicked. Handler functions in jquery always have their context set to the element they are processing at the time (i.e. this == anchor element you clicked on). So we need to use this, and call die on it individually like so.
$('a.clickers').live('click', function clickHandler() {
// keep a reference to the link that is clicked on so we can refer to it
// later in the ajax handler.
var elementClickedOn = this;
// removes the live event handler
// from just this link
$(elementClickedOn).die('click', clickHandler);
// your code
// ajax call, im not 100% familiar with ajax in jquery
// but you get the gist.
$.ajax(server, function ajaxHandler(responseargs) {
if (responseargs.reEnableConditionMet) {
//renable the element's live event handler, by referring to the
//original function
$(elementClickedOn).live('click', clickHandler);
}
});
});
I hope this is close to what you were looking for.