Trouble with Owl Carousel 2.2.1 with Bootstrap 4 Beta

owl carousel cdn
owl-carousel codepen
owl carousel w3school
owl carousel slider example
owl carousel not working
owl carousel react
owl carousel thumbnail slider
owl-carousel dots

I am trying to get a simple carousel designed using owl carousel and Bootstrap 4. I have all of the proper CSS and JS linked on my HTML and follow instructions on their site for HTML and JS, but the carousel does not work. My items just stack on top of each other with no styling nor Javascript. Please see code:

<!-- BOOTSTRAP 4 STYLESHEETS & CUSTOM - before all other stylesheets -->
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/style.css">
<!-- FontAwesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- Owl carousel -->
<link rel="stylesheet" href="../node_modules/owl.carousel/dist/assets/owl.carousel.min.css" />
<link rel="stylesheet" href="../node_modules/owl.carousel/dist/assets/owl.theme.default.min.css" />

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->

<div class="owl-carousel owl-theme">
    <div class="item"><h4>1</h4></div>
    <div class="item"><h4>2</h4></div>
    <div class="item"><h4>3</h4></div>
    <div class="item"><h4>4</h4></div>
    <div class="item"><h4>5</h4></div>
    <div class="item"><h4>6</h4></div>
    <div class="item"><h4>7</h4></div>
    <div class="item"><h4>8</h4></div>
    <div class="item"><h4>9</h4></div>
    <div class="item"><h4>10</h4></div>
    <div class="item"><h4>11</h4></div>
    <div class="item"><h4>12</h4></div>
</div>

<script>
    $('.owl-carousel').owlCarousel({
        rtl:true,
        loop:true,
        margin:10,
        nav:true,
        responsive:{
            0:{
                items:1
            },
            600:{
                items:3
            },
            1000:{
                items:5
            }
        }
    });
</script>

Try the answer from this stack overflow:

Owl Carousel 2 items stack on top of each other.

Use overflow-x: hidden on your slider so you hide the text that isn't in your slider.

Use display: flex on .owl-stage to display the items next to each other.

Home | Owl Carousel, Try the answer from this stack overflow: Owl Carousel 2 items stack on top of each other. Use overflow-x: hidden on your slider so you hide the text that isn't in​  How to use Owl Carousel 2 with problem fix. Salim Rana. Loading Unsubscribe from Salim Rana? How to use Owl Carousel 2 with button , dots customize and animation .

In your sample code dont use javascripts for wol Full sample code is:

<html>
<head>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.2/assets/owl.carousel.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.2/assets/owl.theme.default.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.2/assets/owl.theme.green.min.css" />

<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.2/owl.carousel.min.js"></script>


<style>
    .owl-carousel .item {
        text-align: center;
        /*background-color: #F44336;*/
        height: 300px;
        vertical-align: middle;
    }

        .owl-carousel .item h4 {
            background-color: #808080;
            padding: 5px;
        }
</style>

as you can see , bootstrap and OWL are used. and body is:

<body>
<div class="container-fluid">
    <section id="demos">
        <div class="row">
            <div class="col-lg-12">
                <div class="owl-carousel owl-theme" style="display:block !important;overflow-x: hidden">
                    <div class="item">
                        <h4>
                            <img    src="https://www.w3schools.com/bootstrap/ny.jpg" alt="New york">
                        </h4>
                    </div>
                    <div class="item">
                        <h4>
                            <img    src="https://www.w3schools.com/bootstrap/chicago.jpg" alt="Chicago">
                        </h4>
                    </div>
                    <div class="item">
                        <h4>
                            <img    src="https://www.w3schools.com/bootstrap/la.jpg" alt="Los Angeles">
                        </h4>
                    </div>

                </div>
                <script type="text/javascript">
                    $('.owl-carousel').owlCarousel({
                        loop: true,
                        margin: 0,
                        nav: true,
                        center: true,
                        autoplay: true,
                        autoplayTimeout: 3000,
                        autoplayHoverPause: true,
                        responsive: {
                            0: {
                                items: 1
                            },
                            600: {
                                items: 1
                            },
                            1000: {
                                items: 1
                            }
                        }
                    })         </script>
            </div>
        </div>
    </section>
</div>

by using this sample can resolve your problem.and by change value of item is responsive can modify number of slide show in page. go to owl-carousel more detail in persian language

twitter-bootstrap, Owl Carousel 2. Touch enabled jQuery plugin that lets you create a beautiful responsive carousel slider. Download Github. 2.3.4. mr. Owl  I am trying to use Owl Carousel in my website managed by webpack and bootstrap3. I installed owlcarousel through npm install --save owl.carousel and I import the js file in a typescript file. When I run gulp to compile the site, I got Uncaught TypeError: Cannot read property 'fn' of undefined

//css file
<link rel="stylesheet" href="owlcarousel/owl.carousel.min.css">
<link rel="stylesheet" href="owlcarousel/owl.theme.default.min.css">

//js file
<script src="jquery.min.js"></script>
<script src="owlcarousel/owl.carousel.min.js"></script>

    <div class="owl-carousel">
  <div> Your Content </div>
  <div> Your Content </div>
  <div> Your Content </div>
  <div> Your Content </div>
  <div> Your Content </div>
  <div> Your Content </div>
  <div> Your Content </div>
</div>

have a good time :)

download file

OwlCarousel2 - cdnjs.com, Попробуйте ответ от этого переполнения стека: Owl Carousel 2 items stack on top of each other. Используйте на своем слайдере overflow-x: hidden  This snippet is free and open source hence you can use it in your project.Bootstrap 4 Basic carousel slider - owl carousel snippet example is best for Bootstrap carousel, responsive.A great starter for your new awesome project with 1000+ Font Awesome Icons, 4000+ Material Design Icons and Material Design Colors at BBBootstrap.com.

Owl Carousel 2, Touch enabled jQuery plugin that lets you create beautiful responsive carousel slider. responsive, carousel, owlcarousel, jQuery, plugin. Version. 2.3.4  Replaced ‘Owl Carousel 2.2.1’ with ‘Owl Carousel 2.3 BETA’. Upgrading Owl Carousel fixes an issue with Slide Anything that has been reported to me on numerous occasions – namely if you switch TABS within your browser, switch to another application, or minimise your browser window, then the Slider/Carousel stops (i.e. no more

1. Load jQuery and include Owl Carousel plugin files, DEPRECATED jQuery Responsive Carousel. Issues. #1925 Uncaught TypeError: $().owlCarousel is not a function (even doing it properly) Opened by​  Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.

Slide Anything, OWL Carousel. Touch enabled jQuery plugin that lets you create beautiful responsive carousel slider. Download for FREE · Github / v1.23 /  Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor. Close Start with a boilerplate: (beta) Clear console on run owl.carousel.js

Comments
  • Maybe try to add some explanations on how this is an answer and what OP did wrong. Also you could move that code to a JS Snippet, so we won't have to click a link who said "Download file" :)
  • you sample not used bootstrap . while trouble with owl carousel2-2-1 with bootstrap-4-beta is asked.