I would like to link to a different page for each image in my slideshow. The slideshow rotates correctly but will only link to the last link - link4.php in the example below.
Your help would be greatly appreciated to keep me from pulling all of my hair out! Thank You.
Here’s my code:
CSS
.slider {
margin: 0;
width: 180px;
height: 1504px;
overflow: hidden;
position: relative;
}
a {
position: absolute;
-webkit-animation: round 16s infinite;
opacity: 0;
}
img {
width: 100%;
}
@-webkit-keyframes round {
25% {
opacity: 1;
}
40% {
opacity: 0;
}
}
.slider a:nth-child(4) {
-webkit-animation-delay: 12s;
-moz-animation-delay: 12s;
-ms-animation-delay: 12s;
-o-animation-delay: 12s;
animation-delay: 12s;
}
.slider a:nth-child(3) {
-webkit-animation-delay: 8s;
-moz-animation-delay: 8s;
-ms-animation-delay: 8s;
-o-animation-delay: 8s;
animation-delay: 8s;
}
.slider a:nth-child(2) {
-webkit-animation-delay: 4s;
-moz-animation-delay: 4s;
-ms-animation-delay: 4s;
-o-animation-delay: 4s;
animation-delay: 4s;
}
.slider a:nth-child(1) {
-webkit-animation-delay: 0s;
-moz-animation-delay: 0s;
-ms-animation-delay: 0s;
-o-animation-delay: 0s;
animation-delay: 0s;
}
HTML
<div class="slider">
<a href="link1.php" target="_parent"><img class='photo' src="http://i.imgur.com/IMiabf0.jpg" alt="img1" /></a>
<a href="link2.php" target="_parent"><img class='photo' src="http://i.imgur.com/NqCM7jH.jpg" alt="img2" /></a>
<a href="link3.php" target="_parent"><img class='photo' src="http://i.imgur.com/cjN8Qoa.jpg" alt="img3" /></a>
<a href="link4.php" target="_parent"><img class='photo' src="http://i.imgur.com/WQ2RS6O.png" alt="img4" /></a>
</div>