jQuery/JS: Album-viewer "next/prev"
Continue from this:
Making album-viewer like facebook, where i got to know the server side behind making开发者_运维百科 a album-viewer´s next/prev,
Now I would like to know what I should do to change the adressbar url at the top from ?view=1 to ?view=2? So the adressbar follows/updates, as the new image gets appended and showed(on success)..
Facebook have done it, so as you browse through a album it changes the url to the current image´s link..
How can i do this?
You can keep track of history and have better boomarking with ajax functionality in javascript by linking to and listening for changes in the hash (#) part of the url.
There are a bunch of good jQuery plugins for this, for example:
http://tkyk.github.com/jquery-history-plugin/
精彩评论