DEPRECATED jQuery Responsive Carousel.

Overview

YEAH SO THIS IS PRETTY MUCH DEAD, DO YOURSELF A FAVOR AND SWITCH TO tiny-slider




Owl Carousel 2

Touch enabled jQuery plugin that lets you create a beautiful, responsive carousel slider. To get started, check out https://owlcarousel2.github.io/OwlCarousel2/.

Notice: The old Owl Carousel site (owlgraphic [dot] com) is no longer in use. Please delete all references to this in bookmarks and your own products' documentation as it's being used for malicious purposes.

Quick start

Install

This package can be installed with:

  • npm: npm install --save owl.carousel or yarn add owl.carousel jquery
  • bower: bower install --save owl.carousel

Or download the latest release.

Load

Webpack

Add jQuery via the "webpack.ProvidePlugin" to your webpack configuration:

const webpack = require('webpack');

//...
plugins: [
    new webpack.ProvidePlugin({
      $: 'jquery',
      jQuery: 'jquery',
      'window.jQuery': 'jquery'
    }),
],
//...

Load the required stylesheet and JS:

import 'owl.carousel/dist/assets/owl.carousel.css';
import 'owl.carousel';

Static HTML

Put the required stylesheet at the top of your markup:

<link rel="stylesheet" href="/node_modules/owl.carousel/dist/assets/owl.carousel.min.css" />
<link rel="stylesheet" href="/bower_components/owl.carousel/dist/assets/owl.carousel.min.css" />

NOTE: If you want to use the default navigation styles, you will also need to include owl.theme.default.css.

Put the script at the bottom of your markup right after jQuery:

<script src="/node_modules/jquery/dist/jquery.js"></script>
<script src="/node_modules/owl.carousel/dist/owl.carousel.min.js"></script>
<script src="/bower_components/jquery/dist/jquery.js"></script>
<script src="/bower_components/owl.carousel/dist/owl.carousel.min.js"></script>

Usage

Wrap your items (div, a, img, span, li etc.) with a container element (div, ul etc.). Only the class owl-carousel is mandatory to apply proper styles:

<div class="owl-carousel owl-theme">
  <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>

NOTE: The owl-theme class is optional, but without it, you will need to style navigation features on your own.

Call the plugin function and your carousel is ready.

$(document).ready(function(){
  $('.owl-carousel').owlCarousel();
});

Documentation

The documentation, included in this repo in the root directory, is built with Assemble and publicly available at https://owlcarousel2.github.io/OwlCarousel2/. The documentation may also be run locally.

Building

This package comes with Grunt and Bower. The following tasks are available:

  • default compiles the CSS and JS into /dist and builds the doc.
  • dist compiles the CSS and JS into /dist only.
  • watch watches source files and builds them automatically whenever you save.
  • test runs JSHint and QUnit tests headlessly in PhantomJS.

To define which plugins are build into the distribution just edit /_config.json to fit your needs.

Contributing

Please read CONTRIBUTING.md.

Roadmap

Please make sure to check out our Roadmap Discussion.

License

The code and the documentation are released under the MIT License.

Comments
  • Smooth autoplay

    Smooth autoplay

    Just started using this plugin and really loving it so far but one thing that would make the autoplay function look that much more beautiful in my use-case, is if it would support 'smooth' autoplay. Meaning that it doesn't stop at every new image but just smoothly carries on looping forever.

    feature request 
    opened by Globegitter 50
  • owl-nav disabled

    owl-nav disabled

    Hey.

    I have a problem with the owl-nav. I set it true but at the HTML output it adds the class "disabled".

    Here my code i use the latest version, i downloaded it today.

    <script type='text/javascript'>
    
    jQuery(document).ready(function($) {
    	 $('.owl-carousel').owlCarousel({
    		nav: true,
    		items: 1,
    		loop: true,
    		center: true,
    		margin: 0,
    		lazyLoad:true,
    		dots: false
    	});
     })
    
    </script>"
    
    
    opened by Messa1 47
  • The responsive function doesn't work when i set with autowidth(true) and loop(false)

    The responsive function doesn't work when i set with autowidth(true) and loop(false)

    It is ok in owl.carousel.2.0.0-beta.2.4; JSFiddle Link: https://jsfiddle.net/JSDavi/7z1th3cx/

    But it doesn't work in this new version of owl.carousel.2.1.0; JSFiddle Link: https://jsfiddle.net/JSDavi/rtvc5exr/

    Even in owl.carousel.2.1.4, it doesn't work; JSFiddle Link: https://jsfiddle.net/JSDavi/cotyqt6x/1/

    Also in owl.carousel.2.1.5, it doesn't work; JSFiddle Link: https://jsfiddle.net/JSDavi/689q9zLd/

    What I care is that I can't scroll to the last item.

    Thanks.

    opened by gyx8899 46
  • Can't vertical scroll page on mobile devices with full height owl carousel

    Can't vertical scroll page on mobile devices with full height owl carousel

    I have a 100vh height owl carousel slider in my header on mobile (Android/Chrome) but can't swipe to scroll down the page (touch event on top of slider). Side swipe to trigger slide transitions works fine but no page scrolling is happening on upward or downward swipe. Using version 2.3.0.

    Any help appreciated! Thanks!

    invalid question 
    opened by lholdingfoundry 44
  • autoplay stops working after tab switch

    autoplay stops working after tab switch

    Im using version 2.2.0 and when switching tab, the images do no autoplay

    here is my code

    $('#clients').owlCarousel({ center: true, items:4, loop:true, autoplay: true, autoplayTimeout: 1000, margin:10 });

    bug approved for development 
    opened by unaor 36
  • Wrong owl-stage width calculation when using

    Wrong owl-stage width calculation when using "autoWidth: true"

    Hello, I have a strange bug... I have several pages with a carousel with same option

    $('.owl-carousel').owlCarousel({
        margin:10,
        autoWidth:true,
        items:4,
        nav: true,
        navText: ['<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>']
    })
    

    On same of this pages the carousel doesn't work correctly: the width of the owl-stage element is calculated wrongly and the last item of the carousel goes on a new line (under the firs item in chrome ora under the last item of the first row in firefox). for example look at this page: http://www.galleriacarlasozzani.org/en/past?milano/2010

    the main issue is that it is random... on the vast majority of page everything work fine and the pages with the bug are have exactly the same layout and template of the other one.

    Do you have any idea about fixing this?

    thanks daniele

    opened by danielepennati 36
  • How to slider autoplay start and stop on mousehover and mouseleave?

    How to slider autoplay start and stop on mousehover and mouseleave?

    List of products with slider are available on same slider class, but when i mouse hove in any one li product, then effect only on mouse hover li play and stop slider.

    Only mouse hover li slider play and stop.

    Html Code

    <ul class="product-lists">
        <li class="product">
            <ul class="product-slider owl-carousel">
                <li>slide 1</li>
                <li>slide 1</li>
            </ul>
        </li>
        <li class="product">
            <ul class="product-slider owl-carousel">
                <li>slide 1</li>
                <li>slide 1</li>
            </ul>
        </li>
        <li class="product">
            <ul class="product-slider owl-carousel">
                <li>slide 1</li>
                <li>slide 1</li>
            </ul>
        </li>
        .
        .
        .   
    </ul>
    

    Slider js code bellow:

    var owl = $(".product-slider");                 
    owl.owlCarousel({
        loop:true,
        smartSpeed:450,
        responsiveClass: true,
        responsiveRefreshRate : 10,
        items:1,                        
    });
    
    $('.product-lists li.product').on('mouseover',function(e){
        owl.trigger('play.owl.autoplay');
    })
    $('.product-lists li.product').on('mouseleave',function(e){
        owl.trigger('stop.owl.autoplay');
    })
    

    I have use above code but it not working. Please help me how do it?

    bug 
    opened by presslayouts 29
  • touch scroll / tap not working anymore after upgrade to latest git version

    touch scroll / tap not working anymore after upgrade to latest git version

    After upgrade to the latest git version, tapping (on image to follow link/open modal) and scrolling inside the carousel area isn't working anymore. Bug or feature? :-)

    bug 
    opened by dude2511 27
  • autoHeight not work anymore?

    autoHeight not work anymore?

    i looked in your code there still autoHight function but when i called it, it's showing an error: Uncaught TypeError: Cannot read property 'eq' of null

    can you fixed that?

    bug 
    opened by bdthemes 26
  • how to make synced carousels (clickable thumb-navigation) with OwlCarousel2?

    how to make synced carousels (clickable thumb-navigation) with OwlCarousel2?

    There are already some issues from the last year (#80, #278) dealing with the same topic but I think there is now real solution. So – what I want to achieve is just the same as in this demo in Owl version 1: http://owlgraphic.com/owlcarousel/demos/sync.html

    I have done it so far: http://jsfiddle.net/19v6ybug/

    You can click in the navigation in a thumb to navigate to the correct slide (but when you go back to slide number one… something is wrong). But what I also want to have included is that when I click on the last navigation-thumb the navigation-carousel should move one forward to show the next nav-thumb (like in the demo of owl carousel 1).

    And for now the slide-carousel is not really synced with the navigation-carousel. I found this snippet but it does not work:

    sync1 = $("#slider");
    sync2 = $("#navigation");
    sync1.on('changed.owl.carousel', function(event) {
    sync2.trigger('to.owl.carousel', [event.item.index,300,true]);
    

    Would be awsome if you can help to make a working snippet everyone can use.

    feature request 
    opened by Franz-Kafka 23
  • Last item not fully reachable

    Last item not fully reachable

    When there are too many pictures, the couple last pictures of the carousel are not displaying. The last one displayed seems cut.

    However, if we the browser is a lot wider, the pictures actually appear.

    Here is an example: http://codepen.io/anon/pen/sxrje

    bug feature request 
    opened by coder20938 23
  • ONE ITEM WIDTH 100 CAROUSEL

    ONE ITEM WIDTH 100 CAROUSEL

    Hello friends.

    I'm working in a project of a bank. Embed the owl carousel ando this working, but, when I have just one item, this one expands and justify the item to width 100%. :(

    Can you help me? Thanks!! ;) pantallazo

    opened by jhonh 0
  • need help: two nav and dots elemets in the pages

    need help: two nav and dots elemets in the pages

    i use this $(".owlCarousel").owlCarousel({ loop:false, center:false, margin:10, items:1, responsive:false, nav:true, dots:false })

    but there is two nav and dots elemets in the pages.

    (https://user-images.githubusercontent.com/18481641/205438215-3abbdbaa-7bd6-4ad6-b1d8-03a24b1cab68.jpg)

    opened by lublues 0
  • theme contains a bug

    theme contains a bug

    https://github.com/OwlCarousel2/OwlCarousel2/blob/develop/src/scss/_theme.scss#L43

    This line starts with a '*' which is unrenderable in css within chrome.

    opened by DStarRaj 0
  • Owl carousel items are not working when appended dynamically using ajax,jquery

    Owl carousel items are not working when appended dynamically using ajax,jquery

    owl carousel items are not working when appended dynamically using ajax,jquery below is my ajax code..any help will be really appreciated..

    for (let index = 0; index < count.length; index++) {
                        let i = index + 1;
                        $('.owl-carousel').append(`
                            
                                <div class="bg-primary text-white position-absolute p-1 rounded">${response[i].name_category}</div>
                                <div class="mini-card-hero" style="background-image: url('${base_url + "uploads/images/article/" + response[i].gambar}');">
                                    <div class="p-3">
                                        <a href="artikel/${response[i].title_seo}">
                                            <h3 class="text-light mt-3">${response[i].title}</h3>
                                        </a>
                                        <p>${response[i].excerpt}</p>
                                    </div>
                                </div>
                            
                        `)
                    }
    
    opened by akbar-ardiansyah 0
  • Uncaught TypeError: Cannot read property 'fn' of undefined

    Uncaught TypeError: Cannot read property 'fn' of undefined

    I'm getting this error when I'm using the owl carousel plugin in my laravel 9 project.

    Uncaught TypeError: Cannot read properties of undefined (reading 'fn') at owl.carousel.js:1718:4 at owl.carousel.js:1755:1

    this is how I installed it npm install --save owl.carousel then in app.js I added

    import 'owl.carousel/dist/assets/owl.carousel.css';
    import 'owl.carousel';
    

    then

    npm run build
    nom run dev
    

    this is my app.js file

    import 'owl.carousel';
    import * as bootstrap from 'bootstrap';
    
    import '../sass/app.scss';
    
    
    import jQuery from 'jquery';
    
    
    window.$ = jQuery;
    window.bootstrap = bootstrap;
    
    
    $(document).ready(function() {
    // codes
    });
    

    this is my vite.config.js

    import { defineConfig } from 'vite';
    import laravel from 'laravel-vite-plugin';
    import path from 'path';
    
    export default defineConfig({
        plugins: [
            laravel({
                input: [
                    'resources/sass/app-rtl.scss',
                    'resources/sass/app.scss',
                    'resources/js/app.js',
                ],
                refresh: true,
            }),
        ],
        resolve: {
            alias: {
                '~bootstrap': path.resolve(__dirname, 'node_modules/bootstrap'),
                '$': 'jQuery',
            },
        },
    });
    

    How can I solve this issue ?? I did search on the web nothings works for me thanks

    opened by puertokhalid 2
  • set activated item owlcarousel2 laravel

    set activated item owlcarousel2 laravel

    Hi guys hope everyone doing great!! in my laravel project am looping with foreach and in item number 10 i want to add active class on it. Am showing 1 item in my owl casourel and i want the item that i add active class to be showed in my page not from the first item When i try to add the active class in div item via "if" condition and check my page i find it removed and start with first item :(

    the code am using :

    @foreach($weeks as  $key => $w)
        @php
            $str = ltrim($w->weekNumber, 'S');
        @endphp
        @if($w->fromTo == $today)
            <div class="owl-item active aaaaaaaaaaaaaa">
                <a id="discbtn" class="btn btn-info btn-user btn-block">
                    SEMAINE N°{{$str}}  - DU {{$w->fromTo}}
                </a>
            </div>
        @else
            <div class="owl-item">
                <a id="discbtn" class="btn btn-primary btn-user btn-block">
                    SEMAINE N°{{$str}}  - DU {{$w->fromTo}}
                </a>
            </div>
        @endif
    @endforeach
    

    I try to add "active" class with if condition but is not working

    opened by AsmaaOIsako 0
Releases(2.3.4)
⚠️ [Deprecated] No longer maintained, please use https://github.com/fengyuanchen/jquery-viewer

Viewer A simple jQuery image viewing plugin. As of v1.0.0, the core code of Viewer is replaced with Viewer.js. Demo Viewer.js - JavaScript image viewe

Fengyuan Chen 1k Dec 19, 2022
the last carousel you'll ever need

slick the last carousel you'll ever need Demo http://kenwheeler.github.io/slick CDN To start working with Slick right away, there's a couple of CDN ch

Ken Wheeler 27.8k Dec 27, 2022
Unite Gallery - Responsive jQuery Image and Video Gallery Plugin. Aim to be the best gallery on the web on it's kind. See demo here:

##Unite Gallery - Responsive jQuery Gallery Plugin Product Link: unitegallery.net This gallery has commercial versions for: WordPress , Joomla! , Pres

Max Valiano 531 Oct 24, 2022
jQuery plugin for 'responsive cropping'. Dynamically crop images to fill available space without cutting out the image's subject. Great for full-screen images.

jQuery plugin for 'responsive cropping'. Dynamically crop images to fill available space without cutting out the image's subject. Great for full-screen images.

Jono Menz 3.2k Dec 30, 2022
null 3.9k Dec 30, 2022
jQuery plugin that blows your visitors' retinas

Dense.js Homepage | Issues | Dense is a jQuery plugin for serving retina-ready, high pixel ratio images with ease. Small, ease-to-adapt, yet very cust

Jukka Svahn 212 Jun 30, 2022
A jQuery plugin that displays a thumbnail grid expanding preview similar to the effect seen on Google Images.

jQuery GRIDDER 1.4.2 ======= A jQuery plugin that displays a thumbnail grid expanding preview similar to the effect seen on Google Images. We have all

Orion Gunning 455 Nov 6, 2022
jQuery plugin that makes an image erasable (with mouse or touch movements)

jQuery.eraser v0.5.2 a jQuery plugin that makes an image erasable (with mouse or touch movements) This plugin replaces the targeted image by an intera

boblemarin 327 Oct 27, 2022
jQuery plugin based on raphael.js that allows you to display dynamic vector maps

jQuery Mapael - Dynamic vector maps The complete documentation is available on Mapael website (repository: 'neveldo/mapael-documentation'). Additional

Vincent Brouté 1k Jan 5, 2023
A jquery plugin for comparing two images

jQuery Images Compare A jquery plugin for comparing two images Badges Features compatibility : ie9+ Effort to put appearance via css (easier to skin /

Sylvain Combes 49 Sep 5, 2022
Nivo Slider - The Most Awesome jQuery Image Slider

Maintainer's Wanted! - Ineterested in contributing regularly to Nivo Slider development? Get in touch Nivo Slider The Nivo Slider is world renowned as

Verti Studio 1.2k Dec 24, 2022
Source code for the deprecated expo-google-app-auth package. Deprecated in favor of expo-auth-session.

expo-google-app-auth Source code for the deprecated expo-google-app-auth package. Expo Google App Auth API wrapped the deprecated expo-app-auth packag

Expo 4 Nov 2, 2022
React.js Responsive Minimal Carousel

React Carousel Minimal Easy to use, responsive and customizable carousel component for React Projects. Installation npm i react-carousel-minimal Demo

Sahil Saha 82 Dec 23, 2022
⚠️ [Deprecated] No longer maintained, please use https://github.com/fengyuanchen/jquery-cropper

Cropper A simple jQuery image cropping plugin. As of v4.0.0, the core code of Cropper is replaced with Cropper.js. Demo Cropper.js - JavaScript image

Fengyuan Chen 7.8k Dec 27, 2022
⚠️ [Deprecated] No longer maintained, please use https://github.com/fengyuanchen/jquery-viewer

Viewer A simple jQuery image viewing plugin. As of v1.0.0, the core code of Viewer is replaced with Viewer.js. Demo Viewer.js - JavaScript image viewe

Fengyuan Chen 1k Dec 19, 2022
Responsive Tabs is a jQuery plugin that provides responsive tab functionality.

Responsive Tabs is a jQuery plugin that provides responsive tab functionality. The tabs transform to an accordion when it reaches a CSS breakpoint. You can use this plugin as a solution for displaying tabs elegantly on desktop, tablet and mobile.

Jelle Kralt 537 Dec 8, 2022
Tweak React components in real time. (Deprecated: use Fast Refresh instead.)

React Hot Loader Tweak React components in real time ⚛️ ⚡️ Watch Dan Abramov's talk on Hot Reloading with Time Travel. Moving towards next step React-

Dan Abramov 12.2k Jan 1, 2023
DEPRECATED - A front-end template that helps you build fast, modern mobile web apps.

Deprecation Note Mobile Boilerplate is no longer maintained. Please use HTML5 Boilerplate as a decent starting point for your project. Mobile Boilerpl

H5BP 3.9k Dec 14, 2022
Deprecated - Chosen is a library for making long, unwieldy select boxes more friendly.

Deprecated This version of Chosen is not currently under active development while we decide on its future direction. Chosen Chosen is a library for ma

Harvest 22k Jan 4, 2023
⛔️ DEPRECATED - Dependency-free notification library that makes it easy to create alert - success - error - warning - information - confirmation messages as an alternative the standard alert dialog.

DEPRECATED This repository is no longer supported, please consider using alternatives. Dependency-free notification library. Documentation » Hi NOTY i

Nedim Arabacı 6.7k Dec 21, 2022