Greetings everyone,
I have been tasked with creating a slider using only HTML / jQuery code.
Here is the template:
And here is the HTML code for the template above:
<div id="viewport-container">
<section id="sliding-container">
<article id="slide-0" class="slide"><span></span></article>
<article id="slide-1" class="slide"><span></span></article>
<article id="slide-2" class="slide"><span></span></article>
<article id="slide-3" class="displayed-slide"><span></span></article>
</section>
</div>
<nav id="slider-nav">
<a href="#slide-0" class="active"></a>
<a href="#slide-1"></a>
<a href="#slide-2"></a>
<a href="#slide-3"></a>
</nav>
The functionality should be such that when button {#slide-0} is clicked, it will display article {ID="slide-0"}; subsequently, selecting another button like {#slide-3} will cause the article with {ID="slide-0"} to fade out and the article with {ID="slide-3"} to fade in. This pattern continues as users switch between buttons, causing articles to fade in and out accordingly.
I have been struggling with this task for about a week now, so I would greatly appreciate any assistance you can offer.
Thank you all very much