1
This method has in the documentation, see:
http://www.owlcarousel.owlgraphic.com/demos/urlhashnav.html#seven
URLhashListener:true
startPosition: 'URLHash'
Only implement.
$('.owl-carousel').owlCarousel({
items:4,
loop:false,
center:true,
margin:10,
URLhashListener:true, // ESSE
autoplayHoverPause:true,
startPosition: 'URLHash' // E ESSE
});
In the div.item
you have to have put one data-hash
with a unique name.
Type:
<div class="item" data-hash="foto-um"> IMG </div>
<div class="item" data-hash="foto-dois"> IMG </div>
<div class="item" data-hash="foto-tres"> IMG </div>
From there in the thumbnail images you place a <a href="#foto-um">
.
<a href="#foto-um"><img></a>
<a href="#foto-dois"><img></a>
<a href="#foto-tres"><img></a>
It will be difficult for the thumbnail to select exactly the same image in the Carousel. What you have tried?
– Guerra
@War I was able to select the image that is active and activate the same of the thumbnail, but it does not change according to the Carousel because it still needs to put the event rs
– fronthendy
Put the code you used to see, Voce can do with pure javascript too.
– RFL