I am trying to add the ability to add an href to specific pictures in my slideshow, however I am not sure how to create an href in javascript or jquery, I have searched all over, however my web searching skills are weak and I have thus far been unable to find a solution that works for me here is the code that I am trying to add the href to:
var image1 = 'images/index_19.jpg';
var image2 = 'images/details_10.jpg';
var images2 = [image1, image2];
$(document).ready(function()
{
setInterval(forwardImage2, 4000);
//This function will find the key for the current Image
function currentImageKey2() {
i = jQuery.inArray($('#slideshow2').attr('src'), images2);
return i;
}
//This function will move the slideshow forward one
function forwardImage2()
{
currentImageKey2();
if (i < images2.length - 1)
{
changeImage2(i + 1);
}else
{
changeImage2(0);
}
}
//This function will change to image to whatever the variable i passes to it
function changeImage2(i) {
$('#slideshow2').stop().animate({
opacity: 0,
}, 200, function() {
$('#slideshow2').attr('src', images2[i]);
$('#holder img').load(function() {
$('#slideshow2').stop().animate({
opacity: 1,
}, 200)
})
})
}
});
thanks in advance for any help you can provide.