Skip to content

Commit

Permalink
Merge pull request woocommerce#1099 from jsit/fadefirstslide
Browse files Browse the repository at this point in the history
Adds option not to fade first slide with 'fadeFirstSlide' option. Closes woocommerce#848.
  • Loading branch information
mattyza committed Jun 4, 2014
2 parents a0a2f4a + bfa5915 commit 4d5fd4c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jquery.flexslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,11 @@
if (type === "init") {
if (!touch) {
//slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing);
slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing);
if (slider.vars.fadeFirstSlide == false) {
slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).css({"opacity": 1});
} else {
slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing);
}
} else {
slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2});
}
Expand Down Expand Up @@ -1070,6 +1074,7 @@
animationSpeed: 600, //Integer: Set the speed of animations, in milliseconds
initDelay: 0, //{NEW} Integer: Set an initialization delay, in milliseconds
randomize: false, //Boolean: Randomize slide order
fadeFirstSlide: true, //Boolean: Fade in the first slide when animation type is "fade"
thumbCaptions: false, //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav.

// Usability features
Expand Down

0 comments on commit 4d5fd4c

Please sign in to comment.