[jQuery] Re: Using "window.location.hash" for URLs without plugin

2008-12-05 Thread Alex Hempton-Smith
Thanks, I ended up using a switch: var page = location.hash; switch(page) { case "#networks": showPlaces(); break; case "#about": showAbout(); break; case "#contact": showContact(); break; default: showPlaces(); } Works great for me. Thanks again, Alex -- Alex On Fri, Dec 5, 2008 at 5:57 PM, A

[jQuery] Re: Using "window.location.hash" for URLs without plugin

2008-12-05 Thread Andy Matthews
location.hash is a property, so you'd just get it's value then compare that. Something like this might work: // get the hash var page = location.hash; // show the correct page $('#' + page).show(); andy matthews _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Beh