Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(Nivo Slider v3.2) This is a proper slide effect that slides an image in from the left (and is visually analogous to the 'slideInRight' effect), and doesn't depend on the outer slider and wrapper having overflow:hidden.
... effects if/else if block ...
} else if(currentEffect === 'slideInFromLeft'){
createSlices(slider, settings, vars);
firstSlice = $('.nivo-slice:first', slider);
firstSlice.css({
'width': '0px',
'left' : '0px',
'right': '',
'opacity': '1'
});
firstSlice.children('img').css({
'left': 'auto',
'right': '0'
});
firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){
// Reset positioning
firstSlice.css({
'left': '-0px',
'right': ''
});
slider.trigger('nivo:animFinished');
firstSlice.children('img').css({
'right': 'auto',
'left' : ''
});
});
}
... effects if/else if block continued...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.