Created
May 31, 2012 17:21
-
-
Save ericalli/2844861 to your computer and use it in GitHub Desktop.
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
Open /javascripts/fluidapp.js and find the following snippet of code: | |
// Main Navigation | |
var FluidNav = { | |
init: function() { | |
$("a[href*=#]").click(function(e) { | |
e.preventDefault(); | |
if($(this).attr("href").split("#")[1]) { | |
FluidNav.goTo($(this).attr("href").split("#")[1]); | |
} | |
}); | |
this.goTo("home"); | |
}, | |
Replace with: | |
// Main Navigation | |
var FluidNav = { | |
init: function() { | |
$("a[href*=#]").click(function(e) { | |
e.preventDefault(); | |
if($(this).attr("href").split("#")[1]) { | |
FluidNav.goTo($(this).attr("href").split("#")[1]); | |
location.hash = $(this).attr("href").split("#")[1]; | |
} | |
}); | |
var hash = window.location.hash; | |
if(hash) { | |
FluidNav.goTo(hash.substring(1)); | |
} else { | |
this.goTo("home"); | |
} | |
}, | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment