Create Owl Slider
<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="http://www.jqueryscript.net/demo/Powerful-Customizable-jQuery-Carousel-Slider-OWL-Carousel/owl-carousel/owl.theme.css">
<link rel="stylesheet" type="text/css" href="http://www.jqueryscript.net/demo/Powerful-Customizable-jQuery-Carousel-Slider-OWL-Carousel/owl-carousel/owl.carousel.css">
<style type="text/css">
#owl-demo .item{
background: #42bdc2;
padding: 30px 0px;
margin: 10px;
color: #FFF;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
text-align: center;
}
</style>
</head>
<body>
<h1> Hello </h1>
<div id="moodSlider" class="owl-carousel owl-theme">
<div class="item"><h1>1</h1></div>
<div class="item"><h1>2</h1></div>
<div class="item"><h1>3</h1></div>
<div class="item"><h1>4</h1></div>
<div class="item"><h1>5</h1></div>
<div class="item"><h1>6</h1></div>
<div class="item"><h1>7</h1></div>
<div class="item"><h1>8</h1></div>
<div class="item"><h1>9</h1></div>
<div class="item"><h1>10</h1></div>
<div class="item"><h1>11</h1></div>
<div class="item"><h1>12</h1></div>
</div>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="http://www.jqueryscript.net/demo/Powerful-Customizable-jQuery-Carousel-Slider-OWL-Carousel/owl-carousel/owl.carousel.js" ></script>
<script type="text/javascript">
$(document).ready(function() {
$('#moodSlider').owlCarousel({
loop: true,
margin: 40,
nav: false,
items: 5,
smartSpeed:1000,
autoplay:true,
autoplayTimeout: 500,
//autoplaySpeed: 1000, //Set AutoPlay to 3 seconds
dots:false,
//autoPlay: 3000, //Set AutoPlay to 3 seconds
responsive:{
0:{
items:2,
nav: true
},
767:{
items:3,
nav: true
},
970:{
items:5,
nav: true
}
}
});
});
</script>
</html>
Comments
Post a Comment