If you just want to disable the default link behavior, you can use a combination of delegate and event.preventDefault :
$('#container').delegate('a', 'click', function(e) { if (linksDisabled) { e.preventDefault(); } });
You can then set linksDisabled (in the parent scope) to true or false in your other event handlers, if necessary.
If these links do Javascripty stuff, it's a little trickier. Probably the easiest way is to put an if (linksDisabled) in each event handler.
lonesomeday
source share