Skip to content

Instantly share code, notes, and snippets.

@TheCodonist
Last active July 20, 2019 01:09
Show Gist options
  • Save TheCodonist/773c8276ba30164020b618dacb9142a6 to your computer and use it in GitHub Desktop.
Save TheCodonist/773c8276ba30164020b618dacb9142a6 to your computer and use it in GitHub Desktop.
Owl Carousel Arrows Style
var owl = $('.owl-carousel');
owl.owlCarousel({
items: 5,
loop: true,
margin: 10,
autoplay: true,
autoplayTimeout: 2000,
autoplayHoverPause: true,
nav: true,
navText: ['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>']
});
owl.mouseleave(function () {
owl.trigger('stop.owl.autoplay');
owl.trigger('play.owl.autoplay', [2000])
});
.owl-carousel.absolute-arrows{
position: relative;
}
.absolute-arrows .owl-nav{
font-size: 40px;
line-height: 1em;
color: #777;
font-weight: 300;
}
.absolute-arrows .owl-nav .owl-prev,
.absolute-arrows .owl-nav .owl-next{
position: absolute;
top: calc(50% - 22px);
}
.absolute-arrows .owl-nav .owl-prev{
left: -45px;
}
.absolute-arrows .owl-nav .owl-next{
right: -45px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment