JSFiddle - React, Tailwind, and code Playground
by Cody Lindley
HTML
<script src="https://dl.dropboxusercontent.com/u/2026291/backbone/jquery-2.0.2.js"></script>
<script src="https://dl.dropboxusercontent.com/u/2026291/backbone/lodash.underscore.js"></script>
<script src="https://dl.dropboxusercontent.com/u/2026291/backbone/backbone.js"></script>
<script src="https://getfirebug.com/firebug-lite-debug.js"></script>
CSS
iframe {
height:263px !important;
}
JavaScript
var MyView = Backbone.View.extend({
initialize:function(){
this.render() //just like calling myViewInstance.render();
},
render:function(){
console.log('rendering view');
console.log(this); //note this function is scope to the instance created
return this;
}
});
//create view, run initialize, have initialize call the render function
var myViewInstance = new MyView();