Skip to content

Instantly share code, notes, and snippets.

@Spellhammer
Created March 5, 2021 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Spellhammer/30dc62a92ee2cf69c64359e22765be60 to your computer and use it in GitHub Desktop.
Save Spellhammer/30dc62a92ee2cf69c64359e22765be60 to your computer and use it in GitHub Desktop.
SplitSliderJS
jQuery('.split-slider-wrap__navigation__button').click( function(e) {
e.preventDefault();
jQuery('.unslider .ct-slide').find('.aos-animate').removeClass('aos-animate');
if( jQuery(this).hasClass('split-slider-wrap__navigation__button--left') ) {
jQuery('.unslider-arrow.prev').click();
} else if ( jQuery(this).hasClass('split-slider-wrap__navigation__button--right') ) {
jQuery('.unslider-arrow.next').click();
}
setTimeout( function() {
jQuery('.unslider li.unslider-active .ct-slide').find('.aos-init').addClass('aos-animate');
}, 750);
})
jQuery(document).ready( function() {
jQuery('li:not(.unslider-active)').find('.aos-animate').removeClass('aos-animate');
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment