I have some links displayed on a page. I would like to enable/disable them based on other events on the page. Is there a way to do this with jQuery?
When I am giving functions to the buttons by jquery, I like to do this:
indice = '';
$('myLink').live('click',function() {
if (indice !== 'value1'){
// your code
}
indice = 'value1';
return indice;
});
with this, you get the function just the first time you press de button. Now you just have to set indice different of value1 to your link works again