JavaScript
2
Вклад в тег
let els = document.querySelectorAll('[role="group"]');
for(let i = 0; i < els.length; i++){
els[i].onclick = function(){
document.querySelector('[role="treeitem"]').classList.toggle("expand");
}
}
<div class="target-links">
<a class="link" href="#zero">0</a>
<a class="link" href="#one">1</a>
<a class="link" href="#two">2</a>
</div>
$(function() {
var owl = $(".owl-carousel");
owl.owlCarousel({
items: 4,
dots: false,
loop: true,
margin: 10,
slideBy: 1,
URLhashListener: true,
autoplayHoverPause: true,
startPosition: "URLHash",
onTranslate: function(e) {
$('.target-links .marked').removeClass('marked');
},
onTranslated: function(e) {
$('.target-links .link').eq(e.item.index).addClass('marked');
},
});
});