Skip to content

Instantly share code, notes, and snippets.

@Spellhammer
Created Mar 5, 2021
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