Feel free to experiment with the following code snippet:
HTML
<a href="link1.html" class="picture">imagine this as an image</a>
<div class="bullet">click here to change it manually</div>
jQuery:
$(document).ready(function () {
setInterval(function () { //change this to setInterval for continuous flipping
flip();
}, 2400);
});
var images = [
["imagine this as an image", "link1.html"],
["and envision this as another one", "link2.html"],
["here's one more for display", "link3.html"]
];
var idx = 1;
$(".bullet").click(function () {
flip();
});
function flip() {
if (idx == 3) {
idx = 0;
}
$(".picture").fadeOut(1000, function () {
$(".picture").html(images[idx][0]);
$(".picture").attr("href", images[idx][1]);
$(".picture").fadeIn(1000);
idx++;
});
}
Don't forget to view your updated JSFiddle.