Hey guys,
I’m new to web programming (so bear with me!) and am trying to build this slideshow and have got the interval working to switch the slides, but I now need to connect the thumbnails when clicked to go to the proper pic. I have an idea of what to do, but can’t figure out the proper syntax to write to make it happen? : / Help?!
Here is the jQuery code:
function slideSwitch() {
var $active = $(‘#slideshow IMG.active’);
if ( $active.length == 0 ) $active = $(‘#slideshow IMG:last’);
var $next = $active.next().length ? $active.next()
: $(‘#slideshow IMG:first’);
$active.addClass(‘last-active’);
$next.css({opacity: 0.0})
.addClass(‘active’)
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass(‘active last-active’);
});
}
/*WHAT DO I DO HERE?!!!
$(‘#menu ul li a’).click( “slideSwitch()”);
*/
$(function() {
setInterval( “slideSwitch()”, 4000 );
});