I am using **owl carousel** on my **magento 2** website. I have created a custom module for that.

While I am loading my website first time owl carousel slider is not appearing,.

When I move to other page and **comeback to home page** slider is appearing.

Can anyone help on this. 

**requirejs-config.js**

```
var config = {
    map: {
        "*": {
            bannerowlcarousel: "Vendor_Banner/js/owl.carousel.min"
        }
    }
};

```

**banner.phtml** 

```
<script type="text/javascript">
    require([
        'jquery',
        'bannerowlcarousel'
    ], function ($) {
        $("#banner-slider-demo-1").owlCarousel({
            items: 1,
            autoplay: true,
            autoplayTimeout: 5000,
            autoplayHoverPause: true,
            dots: true,
            nav: true,
            navRewind: true,
            animateIn: 'fadeIn',
            animateOut: 'fadeOut',
            loop: true,
            navText: ["<em class='icon-left'></em>","<em class='icon-right'></em>"]
        });
    });
</script>

```