Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Click function Slideshow help?

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #39316
    caseybaggz
    Participant

    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 );
    });

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.