title: backbone route cycling between routes before getting to the right one
body: <p><s>What is the difference between these two methods of handling routes?</p>
  
  <pre><code>var Router = Backbone.Router.extend({
      routes: {'home': 'showHome}, 
      showHome: function() {//do whatever} 
  });
  </code></pre>
  
  <p>and </p>
  
  <pre><code>var Router = Backbone.Router.extend({
      routes: {'home': 'showHome}, 
      initialize: function() { 
          var router = new Router(); 
          router.on('route:showHome', function(){//do something});
      }
  });
  </code></pre>
  
  <p>Currently I have it the second way. It works fine and I get to the right places.. </s></p>
  
  <p>My router is now set up properly(I think) but my routes are still acting weird(as follows).</p>
  
  <p>The only problem I am having is that when it goes to change a route the address bar flickers between multiple different routes before it lands on the right page (always gets to the right place).</p>
  
  <p>I am changing pages be using <code>window.location = '#/route';</code> inside of jQuery listeners inside of my views. </p>
  
  <pre><code>$('#right_arrow').live('click', {view: that}, this.rightArrow);
  ...
  rightArrow: function(e){
      var that = e.data.view;
      if(typeof window.easyUserData.fbResponse.authResponse === 'undefined') {
          // Not logged in
          window.location = '#/login';
      } else {
          // Logged in
          window.location = '#/notes/right';
      }
      return false;
  }
  </code></pre>
  
  <p>I have been trying to debug and what i have found when i set the breakpoint at <code>window.location = '#/notes/right';</code>:</p>
  
  <ol>
  <li>url changes properly ('#/notes/right')</li>
  <li>return false executes</li>
  <li>right arrow function ends and debugger goes into jquery code</li>
  <li>after five or six 'step over's in debugger (still in jquery code) url changes to '#/news/right', which is another route I use but not sure why it is coming up here</li>
  <li>after a few more 'step over' we get back to the original breakpoint where the url changes to the correct '#/notes/right'</li>
  <li>the new view loads </li>
  </ol>
  
  <p>Why is it behaving like this? Is it related to how I have my router set up?</p>