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?
$(document).delegate('.links', 'click', function () { if ([your condition is true]) { return false; } })
delegation is better than handlers, because you can call them before the dom is loaded