title: event.preventDefault() always just before the end of the functions
body: <p>In almost all the examples / templates scripts I can find, I see <code>event.preventDefault();</code> at the end of the function, like this:</p>
  
  <pre><code>$('.navbar-nav li a').bind('click', function(event) {
      var $anchor = $(this);
      $('html, body').stop().animate({
          scrollTop: $($anchor.attr('href')).offset().top
      }, 1500, 'easeInOutExpo');
      event.preventDefault();
  });
  </code></pre>
  
  <p>From my point of view, the idea is "stop immediately the default behavior then do whatever we have to do", like this:</p>
  
  <pre><code>$('.navbar-nav li a').bind('click', function(event) {
      event.preventDefault();
  
      var $anchor = $(this);
      $('html, body').stop().animate({
          scrollTop: $($anchor.attr('href')).offset().top
      }, 1500, 'easeInOutExpo');
  });
  </code></pre>
  
  <p>So what am I missing?</p>