Created
September 18, 2014 18:17
-
-
Save christurnertv/119658c5a3642d716469 to your computer and use it in GitHub Desktop.
Backbone hello world.
This file contains 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> | |
<title></title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script src="http://underscorejs.org/underscore-min.js"></script> | |
<script src="http://backbonejs.org/backbone-min.js"></script> | |
</head> | |
<body> | |
<div id="main"> | |
</div> | |
<script> | |
var PageNavView = Backbone.View.extend({ | |
el: '#main', | |
initialize: function () { | |
this.render(); | |
}, | |
render:function () { | |
this.$el.html('hello'); | |
return this; | |
} | |
}); | |
var pnv = new PageNavView(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment