Skip to content

Instantly share code, notes, and snippets.

@birkmarcus
Created September 16, 2014 20:20
Show Gist options
  • Save birkmarcus/b50a25156ddfa17eb763 to your computer and use it in GitHub Desktop.
Save birkmarcus/b50a25156ddfa17eb763 to your computer and use it in GitHub Desktop.
views - Cycle - Change background colour on last slide
(function ($) {
$('.view-slider .view-content').cycle({
fx:'scrollLeft'
});
var slideCheck = setInterval(function(){
if($('.view-slider .view-content .views-row-last').is(':visible')) {
$('body').addClass('someclassname');
} else {
$('body').removeClass('someclassname');
}
}, 100);
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment