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
You use can some kind of dispatcher:
$link.on('click', function () { (state ? A : B).call(); });