This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use absolute URLs to navigate to anything not in your Router. | |
// Note: this version works with IE. Backbone.history.navigate will automatically route the IE user to the appropriate hash URL | |
// Use delegation to avoid initial DOM selection and allow all matching elements to bubble | |
$(document).delegate("a", "click", function(evt) { | |
// Get the anchor href and protcol | |
var href = $(this).attr("href"); | |
var protocol = this.protocol + "//"; | |
// Ensure the protocol is not part of URL, meaning its relative. |