$ 0 0 You should be able to accomplish this by using helper functions, and leveraging their element callbacks to setup your logic.