Answer the question
In order to leave comments, you need to log in
How to highlight the active item Owl-Carousel 2.3.4???
There is a carousel with current item selection navigation.
<div class="owl-carousel">
<div class="item" id="one" data-hash="one">1</div>
<div class="item" id="two" data-hash="two">2</div>
<div class="item" id="tree" data-hash="tree">3</div>
<div class="item" id="four" data-hash="four">4</div>
<div class="item" id="five" data-hash="five">5</div>
<div class="item" id="six" data-hash="six">6</div>
<div class="item" id="seven" data-hash="seven">7</div>
<div class="item" id="eigth" data-hash="eigth">8</div>
</div>
<hr>
<a class="button secondary url" href="#one">one</a>
<a class="button secondary url" href="#two">two</a>
<a class="button secondary url" href="#tree">tree</a>
<a class="button secondary url" href="#four">four</a>
<a class="button secondary url" href="#five">five</a>
<a class="button secondary url" href="#six">six</a>
<a class="button secondary url" href="#seven">seven</a>
<a class="button secondary url" href="#eigth">eigth</a>
$(function() {
var owl = $('.owl-carousel');
owl.owlCarousel({
items: 4,
dots: false,
loop: true,
margin: 10,
slideBy: 1,
URLhashListener: true,
autoplayHoverPause: true,
startPosition: 'URLHash'
});
});
<div class="item <i>ACTIVE</i>"></div>
Answer the question
In order to leave comments, you need to log in
https://codepen.io/anon/pen/mvoYRB
A class highlighted
is added that highlights the current element in red
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question