4

I am using this code with CarouFredSel it is working fine, now I want to make it fade instead of slide left to right.

jQuery(document).ready(function($) {
    $("#slider_home").carouFredSel({
        width : "100%",
        height : "auto",
        responsive : true,
        circular : true,
        infinite : false,
        auto : false,
        swipe : { onTouch : true, onMouse : true },
        prev : { button : "#sl-prev", key : "left"},
        next : { button : "#sl-next", key : "right" }
    });
});
jammykam
  • 16,940
  • 2
  • 36
  • 71
techansaari
  • 375
  • 1
  • 5
  • 20

2 Answers2

14

You need to set the scroll fx property when you set up your carousel.

jQuery(document).ready(function($) {
    $("#slider_home").carouFredSel({
        width : "100%",
        height : "auto",
        responsive : true,
        infinite  : false,
        auto : false,
        swipe : { onTouch : true, onMouse : true },
        prev : { button : "#sl-prev", key : "left"},
        next : { button : "#sl-next", key : "right" },
        scroll : { fx : "crossfade" },
        items: 1
    });
});

From the carouFredSel Advanced Configuration documetation:

scroll { fx : "scroll" }

Indicates which effect to use for the transition.

Possible values: "none", "scroll", "directscroll", "fade", "crossfade", "cover", "cover-fade", "uncover" or "uncover-fade".

There is also a demo of this on their site.

Community
  • 1
  • 1
jammykam
  • 16,940
  • 2
  • 36
  • 71
1

You can do using

 scroll      : {
            items           : null,     //  items.visible
            fx              : "scroll",      // its use animation of slide
            easing          : "swing",
            duration        : 500,
            pauseOnHover    : false,
            queue           : false,
            event           : "click",
            conditions      : null,
            onBefore        : null,
            onAfter         : null,
            onEnd           : null
        },
Sangeet Shah
  • 3,079
  • 2
  • 22
  • 25