1

Possible Duplicate:
How to keep the browser history in sync when using Ajax?

I think this is a rather easy fix but I can't find an answer anywhere else...so here goes...I made this kind of template for my homepage...I know the code's not insanely elegant but my main problem is that what if I want to send someone to a specific part of my page...rather than just my "home"...take a look http://useless-r-us.t15.org/

I mean how can I reference each of "blag", "projects", and "about me" using some unique url but still have my pretty css3 transitions...I'm thinking something like this...

http://radokirov.com

P.S....I know blag is a typo --> http://xkcd.com/148/

Community
  • 1
  • 1
JacKeown
  • 2,180
  • 5
  • 24
  • 30
  • Live links are a great *adjunct* to a question, but always post the relevant code *in the question* as well. Two reasons. 1. People shouldn't have to follow a link to help you. 2. StackOverflow is meant to be a resource not just for you now, but for others having a similar issue in the future. External links can get moved, modified, deleted, etc. By making sure the relevant code is in the question, we ensure that the question (and its answers) remain useful for a reasonable period of time. – T.J. Crowder Jul 19 '11 at 21:45
  • 1
    *"P.S...I know blag is a typo"* [Not over here it isn't](http://dictionary.reference.com/browse/blag?r=75&src=ref&ch=dic). It doesn't mean what you intend, but... – T.J. Crowder Jul 19 '11 at 21:48

1 Answers1

0

You should use url hashes (the part of the url following the # sign).

Then, in javascript, in the ready (jquery) event handler, based on the url's hash, you should do the appropriate ajax request and populate the page with the appropriate content.

For more details: Modify Address Bar URL in AJAX App to Match Current State

Community
  • 1
  • 1
Ioan Alexandru Cucu
  • 11,149
  • 6
  • 35
  • 39