Slider Revolution WP
09.27.2016
1 2 3 4 |
data-color="light" data-color="dark" |
1 2 3 4 5 6 7 8 |
/* animate the page's background color */ body {transition: background-color 0.5s ease-out} /* custom styles for the custom classes that will get added */ body.sr-dark {background-color: #000} body.sr-light {background-color: #FFF} |
1 2 3 4 5 6 7 8 9 10 11 12 |
// change "revapi1" below to whatever API name is assigned to your slider var api = revapi1.on('revolution.slide.onchange', function(e, data) { jQuery('body').removeClass('sr-light sr-dark').addClass( 'sr-' + api.find('li').eq(data.slideIndex - 1).attr('data-color') ); }); |
1 2 3 4 5 |
/* Change the color of all text in the page's "entry-content" div */ body.sr-light .entry-content {color: #FFF} body.sr-dark .entry-content {color: #000} |