Skip to content

Instantly share code, notes, and snippets.

@xlawok
Created September 16, 2021 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xlawok/8927e66eebd5f86251d25af166cf6401 to your computer and use it in GitHub Desktop.
Save xlawok/8927e66eebd5f86251d25af166cf6401 to your computer and use it in GitHub Desktop.
3 slides with one centered and arrow rotation
$('body').on('click', '.prev-next.go-slide2', function(e) {
if($('.realizacja-first-gallery-image').hasClass('go-left')){
$('.realizacja-first-gallery-image').addClass('go-right');
$('.realizacja-first-gallery-image').removeClass('go-left');
$('.realizacja-first-gallery-image').css('transform','translateX(30vw)');
$('.prev-next.go-slide2').css('transform','rotate(180deg)');
}
else{
$('.realizacja-first-gallery-image').addClass('go-left');
$('.realizacja-first-gallery-image').removeClass('go-right');
$('.realizacja-first-gallery-image').css('transform','translateX(-35vw)');
$('.prev-next.go-slide2').css('transform','rotate(0deg)');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment