Skip to content

Instantly share code, notes, and snippets.

@cwmanning
Created July 25, 2012 18:24
Show Gist options
  • Select an option

  • Save cwmanning/3177702 to your computer and use it in GitHub Desktop.

Select an option

Save cwmanning/3177702 to your computer and use it in GitHub Desktop.
app change to allow #links
triggerRoute: function(e){
var $targetLink = $(e.target).closest('a'),
href;
if (!$targetLink.length) return;
href = $targetLink.attr('href');
if (href.indexOf('#') == 0 && href.length > 1) return;
App.setHeatTrack($targetLink);
if (Modernizr.history && this.isDefinedRoute(href) && href) {
this.router.navigate(href, true);
return false;
} else if (href && !$targetLink.attr('target')) {
window.location = href;
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment