Skip to content

Instantly share code, notes, and snippets.

@matt-barker
Created March 31, 2018 12:47
Show Gist options
  • Save matt-barker/f3be333207cf8de9b33858534537be27 to your computer and use it in GitHub Desktop.
Save matt-barker/f3be333207cf8de9b33858534537be27 to your computer and use it in GitHub Desktop.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!--Carousel Gallery-->
<script>
$(document).ready(function(){
$('.carousel-gallery').closest('.code-block').next('.gallery-block').addClass('carousel-gallery-block').find('.sqs-gallery-controls').hide();
$('.carousel-gallery-block').hover(
function() {
$(this).find('.sqs-gallery-controls').fadeIn(200);
}, function() {
$(this).find('.sqs-gallery-controls').fadeOut(300);
}
);
});//document.ready
</script>
//Carousel Gallery
.carousel-gallery-block {
.sqs-gallery-container,.sqs-block-content {
height:290px;
}
.sqs-block-content {
padding-bottom:0!important;
}
.sqs-gallery-controls {
font-weight:bold;
}
.sqs-gallery-controls .previous, .sqs-gallery-controls .next {
background-color:#f37f8c;
width:40px;
border-radius:50%;
text-align:center;
}
.sqs-gallery-controls .previous:hover, .sqs-gallery-controls .next:hover {
background-color:#fa6371;
}
.sqs-gallery-controls .previous:before,.sqs-gallery-controls .next:before {
font-weight:bold;
}
.previous {
left:50px;
}
.next {
right:50px;
}
img {
border-radius:25px;
padding:10px;
height:270px!important;
}
.sqs-wrapper {
transition:1000ms ease-out;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment