You can use jQuery's event handling infrastructure to your advantage. You can throw your own, custom events, and subscribe to them using the regular on/off methods. This technique will allow you to separate your code into clearly cut actions that are independent from the event handling of your interface.