Add a disabled class on owlCarousel's arrows, when we can't go to next or go to previous slide.
var $carousel = $('#slider');
$carousel.owlDisabledArrows({
disabledClass : 'owl-disabled'
});
$carousel.owlCarousel({
// owlCarousel config
});
The Owl's documentation says the initialized.owl.carousel
event must be attached before Owl Carousel initialization, so the call to owlDisabledArrows too.