I'm in the process of building a photo gallery, and have the basics working.
At the moment there are a number of thumbnails previews (6) and then a large image above, which then changes using CSS and Java Script. That works fine. The next step would be to use AJAX when clicking the >> arrow next to the thumbs for the next 6 images in the DB and when << is pressed the previous 6. I know how to do this if the page reloaded each time, but would like to do this using ajax, so the page doesn't need to reload and would make the navigating very friendly.
Currently, when the user clicks the thumbail Javascript appends the real image to the selected div.
Can anyone explain how I could retrieve the next and previous thumbs using ajax and then force them to reload? I have tried looking for some tutorials but have come up short? Any help or links would be appreciated.
At the moment there are a number of thumbnails previews (6) and then a large image above, which then changes using CSS and Java Script. That works fine. The next step would be to use AJAX when clicking the >> arrow next to the thumbs for the next 6 images in the DB and when << is pressed the previous 6. I know how to do this if the page reloaded each time, but would like to do this using ajax, so the page doesn't need to reload and would make the navigating very friendly.
Currently, when the user clicks the thumbail Javascript appends the real image to the selected div.
Can anyone explain how I could retrieve the next and previous thumbs using ajax and then force them to reload? I have tried looking for some tutorials but have come up short? Any help or links would be appreciated.