AnythingSlider - link to a certain image in the slider from a different page

1.4k Views Asked by At

I'm using AnythingSlider jQuery plugin for my gallery. What I try to do is - create a link and "link" it to a specific slide on another page's slider.

For example, the link I have on the page gallery.php is:

<a href="photo.php?imageID=12345"></a>

And my slider itself is on the page photo.php and it does contain that image in one of its slides. I need to show that specific image first in the slider on the page photo.php when it loads.

Does anybody have any clue on how can this be achieved?

Thanks.

1

There are 1 best solutions below

3
On BEST ANSWER

Anything slider has this functionality built-in. It updates the URL hash with the current slideshow and slide when you click one of the navigation tabs.

Here is a link to an AnythingSlider demo page, notice when you click on a tab to change the slide that the URL hash changes: http://css-tricks.com/examples/AnythingSlider/

To link to the fourth slide on the first slideshow on the page you would add this to the URL:

#panel1-4

This option is turned-on by default with the hashTags option set to true.