CSS-Tricks / AnythingSlider

A jQuery Slider plugin for anything.
http://css-tricks.github.io/AnythingSlider/
GNU Lesser General Public License v3.0
1.15k stars 380 forks source link

Problems with the fx-libary on fading #439

Closed janstieler closed 12 years ago

janstieler commented 12 years ago

Hi, I used the FX-libary to give different elements different effects. But I have the problem that my class .headline is moving to left on fadingout. How can I fix this?

$(function(){ 
    $('#slider')
    .anythingSlider({
        buildArrows: false,
        buildStartStop: false,
        resizeContents: true,
        autoPlay: true,
        autoPlayLocked: false,
        autoPlayDelayed: false,
        pauseOnHover: true,
        stopAtEnd: false,
        playRtl: false,
        delay: 3000,
        resumeDelay: 15000,
        animationTime: 600,
        delayBeforeAnimate: 0,
        // Callback when the plugin finished initializing
        onInitialized: function(e, slider) {
            slider.$controls.prepend('<ul><li><a class="prev"><</a></li></ul>').append('<ul><li><a class="next">></a></li></ul>').find('.prev, .next').click(function() {
                if ($(this).is('.prev')) {
                    slider.goBack();
                } else {
                    slider.goForward();
                }
            });
        }       
    }) 
    .anythingSliderFx({
        // base FX definitions can be mixed and matched in here too. 
        '.headline' : [ 'fade' ],
        '.starelement' : {};
    });
});
Mottie commented 12 years ago

Hi bueroexit!

Try adding a low number to the delayBeforeAnimate option. Something like 50 or 100 and see if that fixes the look.

janstieler commented 12 years ago

Hi, thanks this helped to solve the problem!

BR