Grow your CSS skills. Land your dream job.

Jquery Tab Effect & URLs

  • # August 27, 2009 at 2:23 pm

    OK, jquery problem… I am creating a simple tabbed effect for a website. Click on a tab, the tab itself changes to an active state and the content below the tab changes. That is working quite well. What I would like to do though is link each tab to a specific url — so, by visiting url.com/page.html#1 the visitor would see tab #1, url.com/page.html#2 would see tab #2, etc.

    Any ideas as to how I could go about that? (jQuery/javascript specific, I should add.) Not necessarily looking for specific code, just ways to approach the problem, or links to tutorials that might have done similar things.

    # August 27, 2009 at 3:12 pm

    Solved my own question… In case anyone else finds this useful, one approach is to use window.location.hash.

    Code:
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".