Hi,
I'm new to Jquery and even Javascript. Found and implemented this script that in a timely matter replaces images. Script works well when I wrap the images in an tag. I want the images to be links. As soon as I wrap the tags in an tag the script sill refreshes every so many seconds but it doesn't load the next image.
What should I change in this script to have the next image load correctly
<script type='text/javascript'>
function swapImages(){
var $active = $('#rooster .active');
var $next = ($('#rooster .active').next().length > 0) ? $('#rooster .active').next() : $('#rooster img:first');
$active.fadeOut(function(){
$active.removeClass('active');
$next.fadeIn().addClass('active');
});
}
$(document).ready(function(){
// Run our swapImages() function every 5secs
setInterval('swapImages()', 5000);
}); </script>