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>
<div id="myView"><span>Bold</span> not bold!</div>
<span>Bold</span> not bold!
CSS
iframe {
height:163px !important;
}
JavaScript
var MyView = Backbone.View.extend({
initialize:function(){
this.render()
},
render:function(){
//this.$() is shortcut for jQuery(this.el).find('span');
//doing $('span') would find all span elements
//using this.$('span') only finds/select span's in the el node
this.$('span').css('font-weight','bold');
}
});
var myViewInstance = new MyView({el:'#myView'});