Forums

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

Home Forums JavaScript Need Help On jQuery For Slideshow.

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

    I am trying to find out how I can change my fade in effect to a slide. Trying to get it so it slides left rather than fade.

    // Fading animation
            slideTo = function (idx) {
              settings.before(idx);
              // If CSS3 transitions are supported
              if (supportsTransitions) {
                $slide
                  .removeClass(visibleClass)
                  .css(hidden)
                  .eq(idx)
                  .addClass(visibleClass)
                  .css(visible);
                index = idx;
                setTimeout(function () {
                  settings.after(idx);
                }, fadeTime);
              // If not, use jQuery fallback
              } else {
                $slide
                  .stop()
                  .fadeOut(fadeTime, function () {
                    $(this)
                      .removeClass(visibleClass)
                      .css(hidden)
                      .css("opacity", 1);
                  })
                  .eq(idx)
                  .fadeIn(fadeTime, function () {
                    $(this)
                      .addClass(visibleClass)
                      .css(visible);
                    settings.after(idx);
                    index = idx;
                  });
              }
            };
    
Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.