This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function curry(callback, context) { | |
var curryArgs = Array.prototype.slice.call(arguments, 2); | |
return function() { | |
var args = Array.prototype.slice.call(arguments); | |
callback.apply(context, curryArgs.concat(args)); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{#each models}}<!-- the each block iterates like a foreach block over the given context models --> | |
<div> | |
{{this.attributes.name}}<!--this refers to the current model in the array models --> | |
</div> | |
{{/each}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head></head> | |
<body> | |
<script type="text/javascript" src="handlebars.js"></script> | |
<script type="text/javascript" src="jquery.js"></script> | |
</body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head></head> | |
<body> | |
<script type="text/javascript" src="handlebars.js"></script> | |
<script type="text/javascript" src="jquery.js"></script> | |
<!-- create your template... below, this will evaluate myContextObject.title --> | |
<script id="entry-template" type="text/x-handlebars-template"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head></head> | |
<body> | |
<script type="text/javascript" src="handlebars.js"></script> | |
<script type="text/javascript" src="jquery.js"></script> | |
<!-- this evaluates myContextObject.title --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this is a test gist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The capitalized 'Note' defines the data structure that every lowercase 'note' instance will inherit from */ | |
/* 'initialize' is called when you create a new instance of the class using the 'new' keyword */ | |
/* when you initialize a new instance of the class, each property of the default object becomes a property of the instance */ | |
var Note = Backbone.Model.extend({ | |
initialize: function() { ... }, | |
methodOne: function() {...} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hi per |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asdfsadfsadf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Colin working on issue #159 | |
it('should render div tag even if div tag is the last element before the closing collection helper', function(){ | |
var dummyCollection = new Thorax.Collection({ // create collection | |
}) | |
var view = new Thorax.View({ | |
template: Handlebars.compile('{{collection dummyCollection}}<div> </div>{{/collection}}') |
OlderNewer