javascript - How to achieve the Facebook Photo Albums affect in the URI? -


those use facebook have noticed recent change photo albums , viewing of photos.

they allow use left , right arrow keys on keyboard change photo viewing.

i know there many open source javascript scripts photo viewing different... in old facebook albums , other javascript photo albums, seem use # in uri/url id's , can make ajax call.

example;
http:mydomain.com/album.php?aid=12312&pid=43534#someidhereaswell

the new version on facebook seems have same result/affect url's this...

http://www.facebook.com/photo.php?fbid=1431582004331&set=a.1317260946376.35985.1676316284&theater http://www.facebook.com/photo.php?fbid=1304601029886&set=a.1317260946376.35985.1676316284&theater http://www.facebook.com/photo.php?fbid=1431444360890&set=a.1317260946376.35985.1676316284&theater 

so there no # in url javascript use, how can done?

i think uses this:

var stateobj = { foo: "bar" }; history.pushstate(stateobj, "page 2", "bar.html"); 

found here: change url in browser without loading new page using javascript

i've been testing out here: http://django.liveproject.is/event/rff/

i haven't found out , forward button functionality or if should use history.replacestate() rather history.pushstate().

edit:

i think may our answer: cross-browser jquery ajax history window.history.pushstate , fallback


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -