Skip to content

Instantly share code, notes, and snippets.

@reatcory
Created January 31, 2013 16:39
Show Gist options
  • Save reatcory/4684197 to your computer and use it in GitHub Desktop.
Save reatcory/4684197 to your computer and use it in GitHub Desktop.
Rough js implementation for slider image and text boxes to be different
$('view-homepage-slider').cycle({
fx: 'fade',
speed: 'slow',
timeout: 0,
before: onBefore,
after: onAfter,
});
function onBefore(curr, next, opts){
// Code to do stuff before the slide changes
$('.views-field-title').slideUp();
}
function onAfter(curr, next, opts){
// Code to do stuff after the slide changes
$('.views-field-title').slideDown();
}
function onBefore(curr, next, opts){
// Code to do stuff before the slide changes
$('.views-field-field-homepage-slider-text').slideUp();
}
function onAfter(curr, next, opts){
// Code to do stuff after the slide changes
$('.views-field-field-homepage-slider-text').slideDown();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment