Created
July 20, 2011 02:33
-
-
Save qichunren/1094213 to your computer and use it in GitHub Desktop.
mark url location history( ajax history)
This file contains hidden or 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
| // mark current location url | |
| $("#nav_ticker").click(function(){ | |
| $("#nav ul li").removeClass("active"); | |
| $(this).addClass("active"); | |
| window.location.hash = "tickers/cp"; | |
| }); | |
| $("#nav_announce").click(function(){ | |
| $("#nav ul li").removeClass("active"); | |
| $(this).addClass("active"); | |
| window.location.hash = "current_route"; | |
| }); | |
| $("#nav_tv").click(function(){ | |
| $("#nav ul li").removeClass("active"); | |
| $(this).addClass("active"); | |
| window.location.hash = "tvs/cp"; | |
| }); | |
| $("#nav_settings").click(function(){ | |
| $("#nav ul li").removeClass("active"); | |
| $(this).addClass("active"); | |
| window.location.hash = "settings/cp"; | |
| }); | |
| $("#nav_about").click(function(){ | |
| $("#nav ul li").removeClass("active"); | |
| $(this).addClass("active"); | |
| window.location.hash = "about"; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment