4
var sync1 = $("#sync1");
5
var sync2 = $("#sync2");
7
var syncedSecondary = true;
18
responsiveRefreshRate: 200,
20
'<svg width="12" height="12" height="100%" viewBox="0 0 11 20"><path style="fill:none;stroke-width: 3px;stroke: #fff;" d="M9.554,1.001l-8.607,8.607l8.607,8.606"/></svg>',
21
'<svg width="12" height="12" viewBox="0 0 11 20" version="1.1"><path style="fill:none;stroke-width: 3px;stroke: #fff;" d="M1.054,18.214l8.606,-8.606l-8.606,-8.607"/></svg>',
24
.on("changed.owl.carousel", syncPosition);
27
.on("initialized.owl.carousel", function () {
28
sync2.find(".owl-item").eq(0).addClass("current");
39
slideBy: slidesPerPage,
40
responsiveRefreshRate: 100,
42
.on("changed.owl.carousel", syncPosition2);
44
function syncPosition(el) {
45
var count = el.item.count - 1;
46
var current = Math.round(el.item.index - el.item.count / 2 - 0.5);
51
if (current > count) {
57
.removeClass("current")
60
var onscreen = sync2.find(".owl-item.active").length - 1;
61
var start = sync2.find(".owl-item.active").first().index();
62
var end = sync2.find(".owl-item.active").last().index();
65
sync2.data("owl.carousel").to(current, 100, true);
67
if (current < start) {
68
sync2.data("owl.carousel").to(current - onscreen, 100, true);
72
function syncPosition2(el) {
73
if (syncedSecondary) {
74
var number = el.item.index;
75
sync1.data("owl.carousel").to(number, 100, true);
79
sync2.on("click", ".owl-item", function (e) {
81
var number = $(this).index();
82
sync1.data("owl.carousel").to(number, 300, true);