walmartlabs/thorax — pull request #127 by eastridge (2013-03-08 00:42:43+00:00)
Title: Add elements hash

An early task for many beginners in a backbone app seems to be "how do I add this jQuery functionality to my view". This unfortunately requires an understanding of the view lifecycle and that elements are only available after the view is rendered. The `elements` hash provides a simple way to access elements once a view is rendered. Each function in the elements hash will be called each time the view's HTML is updated via `html`.

elements: {
'li': function($el) {},
'#someId': function($el) {}
}