BorysSokolov Posted April 12, 2013 Share Posted April 12, 2013 I'm in the process of building a photo gallery, but the navigation is sort of clunky. The entire page has to reload whenever the user clicks for the next image to show. I would like the image browsing to work similarly to this: ( http://www.befunky.com/explore/gallery/4042294/ ) - only the image information and the image refresh when the user navigates to the next picture, and the URL changes according to the image. I know how to make the navigation, but I'm not sure about the URL. In the code I previously wrote, it remained static while the images changed (which I don't want). So, how do I change the images along with the URL, on click, without reloading the entire page? I plan to do this in ajax/jQuery by the way. Thanks. Link to comment https://forums.phpfreaks.com/topic/276851-simple-question-regarding-image-navigation/ Share on other sites More sharing options...
trq Posted April 12, 2013 Share Posted April 12, 2013 You'll want to Google "JavaScript pushstate" Link to comment https://forums.phpfreaks.com/topic/276851-simple-question-regarding-image-navigation/#findComment-1424286 Share on other sites More sharing options...
BorysSokolov Posted April 13, 2013 Author Share Posted April 13, 2013 I played around with what you suggested and got it working. Thanks. Link to comment https://forums.phpfreaks.com/topic/276851-simple-question-regarding-image-navigation/#findComment-1424521 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.