Skip to content

Instantly share code, notes, and snippets.

@TLMcode
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TLMcode/3b2d04f4fe528c17bfbf to your computer and use it in GitHub Desktop.
Save TLMcode/3b2d04f4fe528c17bfbf to your computer and use it in GitHub Desktop.
anon view test
(function()
{
var view =
{
init: function()
{
this.cacheDom();
this.render();
},
cacheDom: function()
{
this.$el = $( '#main_div' );
this.$viewdiv = this.$el.find( '#view_div' );
this.template = this.$el.find( '#view' ).html();
},
render: function()
{
this.$viewdiv.append( this.template );
}
};
view.init();
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment