Jquery: Show | Hide Div if Hash and Div ID match?
I'm trying to create a jquery function that checks the URL hash link and match it to a Div ID which shows or hides the DIV on load. I searche开发者_Go百科d around but haven't found a solid fix.
I'm not sure I understood what you meant, but if you want to hide the current page's nav link for example...
$(document).ready(function() {
url = document.location.href;
hash = url.split('#');
$('#'+hash[1]).hide();
});
精彩评论