-
-
Save Spellhammer/30dc62a92ee2cf69c64359e22765be60 to your computer and use it in GitHub Desktop.
SplitSliderJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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