Skip to content

Instantly share code, notes, and snippets.

View mugurm's full-sized avatar
💭
I may be slow to respond.

Mugur Marculescu mugurm

💭
I may be slow to respond.
View GitHub Profile
@mugurm
mugurm / gist:4666470
Created January 29, 2013 18:36
A backbone.js view example that illustrates: 1. Solving the problem of referencing a DOM template (#my-view-template) in body elem before the page is fully constructed. This happens when your view is created in script before ready event. 2. Creating a custom class on element, if the class is not handled in the template, which varies on each view…
/*
A backbone view example that illustrates:
1. Solving the problem of referencing a DOM template (#my-view-template)
in body elem before the page is fully constructed.
2. Creating a custom class on element, if the class is not handled in the template.
3. Sending the result of a model method call along with serialized model to template.
*/