I've built a basic tabbed interface using jQ开发者_如何学Pythonuery using this technique. I want to be able to link to the page with different tabs open.
At the moment the index page loads and holds the content for all the pages in hidden divs and displays each with an animation when the tab is selected. I want to keep this functionality, but also allow direct links (domain.com/section_title) to work. Right now jQuery is adding the functionality to links using href elements set to element ids (href="#section").
Thanks for any help!
The best strategy here is to link directly to domain.com/Index.html#section
and set up the jquery to load the "section" tab as pre-opened on the page.
It's not trivial to set up domain.com/index/section
syntax for this functionality, because the server will look for a "section" page and not load your tabbed "index" page by default. However, there are ways to do it, such as via ASP.NET Routing.
精彩评论