$(window).scroll(function(){ if ($(window).scrollTop() >= 1) { $('.headerSec').addClass('fixed-header'); } else { $('.headerSec').removeClass('fixed-header'); } }); $('#client-review').owlCarousel({ loop: true, margin: 30, nav: true, dots: false, autoplayHoverPause: false, autoplay: 1000, //5000 smartSpeed: 0, smartSpeed: 700, responsive: { 0: { items: 1 }, 768: { items: 2 }, 1100: { items: 3 } } });