var slider = $(sliderSelector);
var preview_slider = $(sliderPreviewSelector);
slider.owlCarousel({
items: 1,
nav: false,
dots: false,
loop: false,
onChanged: callback
});
function callback(e) {
var index = e.item.index;
preview_slider.removeClass('active').eq(index).addClass('active');
}
slide_preview.click(function () {
var index = $(this).index();
slider.trigger("to.owl.carousel", [index, 300, true]);
});
::-webkit-scrollbar {
width: 10px;
background-color: rgba(0, 0, 0, 0);
border-radius: 100px;
}
::-webkit-scrollbar:hover {
background-color: rgba(0, 0, 0, 0.09);
}
::-webkit-scrollbar-thumb:vertical {
background: rgba(0, 0, 0, 0.5);
border-radius: 100px;
background-clip: padding-box;
border: 2px solid rgba(0, 0, 0, 0);
min-height: 10px;
}
::-webkit-scrollbar-thumb:vertical:active {
background: rgba(0, 0, 0, 0.61);
border-radius: 100px;
}
<script>
$(document).ready(function(){
$('button').on('click', function() {
var element = $(this).parents('.element');
var bank_id = $('input.bank_id', element ).val();
var id = $('input.id', element ).val();
$.ajax({
method: 'POST',
url: 'bank_id_by_name_ajax.php',
data: {id: id, bank_id: bank_id}
})
.done(function() {
}
)
}
)
})
</script>