Skip to content

Instantly share code, notes, and snippets.

@Spellhammer
Created March 5, 2021 20:40
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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