Add class, click next div to remove previous active class

$(function() {
$('.active-play').click(function() { // when a .myDiv is clicked
$(function() { $('.active-play').click(function() { 
// when a .myDiv is clicked $('.active-play').not(this).removeClass('active') 
$(this).toggleClass('active') }) })

parent div witdh same like below image width

$(‘.blog-details-img’).each(function() {

<div style=”margin:0 auto;” class=”blog-details-img”>
<img src=”assets/img/blog-details-img.jpg” alt=””>
<div class=”text”>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Temporibus, necessitatibus nihil iure labore quo. Optio incidunt mollitia enim beatae vero.</p>

OwlCarousel wrap center. with click center wrap to next wrap.

var $owl = $(‘.carousel_active’);

$owl.children().each( function( index ) {
$(this).attr( ‘data-position’, index ); // NB: .attr() instead of .data()

if ($.fn.owlCarousel) {
items: 2,
loop: true,
nav: false,
autoplay: false,
margin: 60,

$(document).on(‘click’, ‘.owl-item > .carousel_single’, function() {
$owl.trigger(‘to.owl.carousel’, $(this).data( ‘position’ ) );