Given e.g. a class instance of some sort has a state (e.g. \'active\', \'inactive\', …). The instance also attaches a click event to e.g. a link but the event handler does somet
id say you just check the click event. Then in the click event check the instance state
link.live('click', function() { switch(instance.state){ case 'active': function A(); break; case 'inactive': function B(); break; } }