title: How to use Backbone.StateManager?
body: <p>I am trying to explore Backbone.StateManager but couldn't find much material on this. 
  I have gone through <a href="https://github.com/crashlytics/backbone.statemanager" rel="nofollow">the documentation</a> but there is no simple example of using it. </p>
  
  <p>I have made an example like this</p>
  
  <pre><code>(function($) {
  
      var UserInputView  = Backbone.View.extend({
          states: {
              foo: {
                  enter: function () {
                      alert('hi');
                      return console.log('enter bar');
                  },
                  exit: function () {
                      alert('hi');
                      return console.log('exit foo');
                  },
                  transitions: {
                      transitions: {
                          'onBeforeExitTo:anotherState': function () {
                              alert('hi');
                          },
                          'onExitTo:anotherState': function () {
                              alert('hi');
                          },
                          'onBeforeEnterFrom:anotherState': function () {
                              alert('hi');
                          },
                          'onEnterFrom:anotherState': function () {
                              alert('hi');
                          }
                      }
                  }
              },
              bar: {
                  enter: function () {
                      alert('hi');
                      return console.log('enter bar');
                  },
                  exit: function () {
                      alert('hi');
                      return console.log('exit bar');
                  },
  
              }
          },
          initialize: function () {
              var statemanager;
  
              alert('intialized');
              console.log(this.states);
              statemanager = Backbone.StateManager.addStateManager(this.states);
  
              return statemanager;
          },
          render: function () {
  
              alert('render');
          }
      });
      var user = new UserInputView();
  
  })(jQuery);
  </code></pre>
  
  <p>In all this code only intialization function is working. Rest of the code is not functioning. Please guide</p>