title: How does "this" function in this code Backbone sample?
body: <p>How does the <code>this</code> property function in this Backbone.js code sample?</p>
  
  <p>Since the <code>use strict</code> directive is not specified within the code and no object is passed to any of the functions, does the Backbone.js code default to the global app object or does it do something else?</p>
  
  <p>I'm assuming that <code>this.render()</code> probably renders to the DOM element specified by the <code>el</code> property passed in via the underscore template, but what about <code>this.$el.html</code>?</p>
  
  <pre><code>&lt;script type="text/template" id="search_template"&gt;      
    &lt;label&gt;Search&lt;/label&gt; 
    &lt;input type="text" id="search_input" /&gt; 
    &lt;input type="button" id="search_button" value="Search" /&gt;
  &lt;/script&gt;
  &lt;div id="search_container"&gt; &lt;/div&gt;
  &lt;script type="text/javascript"&gt;
    var SearchView = Backbone.View.extend({ 
        initialize: function({
            this.render(); 
        }, 
        render: function(){ 
            // Compile the template using underscore 
            var template = _.template( $("#search_template").html(), {} ); 
            // Load the compiled HTML into the Backbone "el" 
            this.$el.html( template ); 
        }
    }); 
    var search_view = new SearchView({ el: $("#search_container") }); 
  &lt;/script&gt;
  </code></pre>