Let's say I have two web pages: index.html and page.html. On page.html, there is a slider with 9 slides created using the plugin StackSlider
. Now, when a link on index.html is clicked, I want to navigate to a specific slide, like slide number 4, on page.html.
How can I achieve this?
I attempted the following method but it didn't work as expected
This is the code in my index.html file
<body>
<a href="page.html#one">Go to the 1st slide on page.html</a>
<a href="page.html#two">Go to the 3rd slide on page.html</a>
</body>
This is a snippet of the code in page.html
<section class="main">
<ul>
<li id="one">
<img src="images/1.jpg" />
</li>
<li>
<img src="images/2.jpg" />
</li>
<li id="two">
<img src="images/3.jpg" />
</li>
<li>
<img src="images/4.jpg" />
</li>
</ul>
</section>