title: Refresh Backbone ClassName & Attributes
body: <h2>Question</h2>
  
  <p>How can in update Backbone el when re-rendering on model changes?</p>
  
  <hr>
  
  <p>I Currently have an event listener, listening to model changes like this.</p>
  
  <p><code>this.listenTo(this.model, 'change', this.render);</code></p>
  
  <p>This will then re-render the view correctly however the className &amp; attributes are not updated to reflect the model changes, they look like this.</p>
  
  <pre><code>className: function()
  {
      var childClassName  = ( null === this.model.get('parent_id') ? '' : ' list-item-child' ),
          parentClassName = ( false == this.model.get('parent') ? '' : ' list-item-parent');
  
      return 'list-item' + childClassName + parentClassName;
  },
  
  attributes: function()
  {
      return {
          'data-id': this.model.get('id'),
          'data-parent': this.model.get('parent_id')
      }
  },
  </code></pre>