Created
March 19, 2015 14:15
-
-
Save sandropaganotti-zz/8dfc1100c90090651d68 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
$(document).ready(function() { | |
$('.nav li:not(.page-item-48) a').click(function(e) { | |
e.preventDefault(); | |
if($('.nav li.page-item-48').is('.current_page_item')){ | |
window.location.href = '/'; | |
}else{ | |
var tokens = $(this).attr('href').split('/'); | |
window.location.hash = tokens[tokens.length - 2]; | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment