Skip to content

Instantly share code, notes, and snippets.

@eastridge
Created August 28, 2012 21:51
Show Gist options
  • Save eastridge/3504663 to your computer and use it in GitHub Desktop.
Save eastridge/3504663 to your computer and use it in GitHub Desktop.
$(function() {
var Application = window.Application = new Thorax.ViewController({
template: "{{layout}}"
});
Backbone.history.start();
Application.render();
$('body').append(Application.el);
var Todos = Thorax.Collections.Todos = Thorax.Collection.extend({});
var Cats = Thorax.Collections.Cats = Thorax.Collection.extend({});
Cats.instance = new Cats([
{
name: "Mittens",
age: 3,
qualities: {
fluffy: false,
bitey: true,
snarky: false
},
todos: new Todos([
{
item: 'Finish Thorax Site',
done: false
},
{
item: 'Neuter best friend',
done: true
}
])
},
{
name: "George",
age: 5,
qualities: {
fluffy: true,
bitey: false,
snarky: false
},
todos: new Todos([
{
item: 'Catch mice',
done: true
},
{
item: 'Think of better todo list',
done: false
}
])
},
{
name: "Killer",
age: 2,
qualities: {
fluffy: false,
bitey: false,
snarky: true
},
todos: new Todos([
{
item: 'Finish Thorax Site',
done: false
},
{
item: 'Neuter best friend',
done: true
}
])
}
]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment