System for processing hash tags for tab content? (#!)

I have four pages on the main part of the website I'm working on, with tabs to switch between them. I want the switch between 4 tabs to be a fade transition (using jQuery). It's all fine and dandy, but I also want SEO to think of each as a separate page. I also want to be able to link to the URL and make it pick the right content, even if it is technically the same page.

Facebook does this (facebook.com/#!/another-string-here) and you can switch between pictures, etc., so it acts like a request using javascript.

This allows you to switch immediately, the ability to link to it, and each of them acts as its own page.

Is there a recommended way to do this?


UPDATE the best I found is SammyJS - not implemented, but this is the best answer: http://sammyjs.org/

+5
source share
2 answers

Say you have a base page called services, and this page has two tabs: designand development(for simplification only). Therefore, if your domain was example.com, your hash URL when you click on the "Design" tab will look approximately the http://example.com/services#!/designsame as for development. I assume you know how to do this.

, , . , http://example.com/services/design http://example.com/services/development. href , onclick , -.

, JavaScript Ajaxy - , JavaScript ( -) , , .


, Facebook. HTML5 history.pushState() , , -, (. .)

+1

, ( facebook SEO), -, (google ..) javascript.

, , , , URL- -, #fade, jquery 0, . , , e.preventDefault() return false . , javascript location.href="site" #fade

: : http://fiddle.jshell.net/msm595/u5Eg2/3/show/light/

0

All Articles