Giter VIP home page Giter VIP logo

owlcarousel-sync-plugin's Introduction

OwlCarousel Sync Plugin

This is a plugin to sync two Owl Carousels.

Inspired by @tonykiefer 's script in http://vertx.com/edc-transit-sling

See:

Description

This function was made to supply the need to synchronize two OwlCarousels. E.g.: embed product gallery.

Install

  • Bower: $ bower install owl.carousel.sync

Usage

Just follow the steps:

  1. Construct your exhibition carousel and your nav carousel the way you want.
  2. Use jQuery selector (or variable with the carousel Object) and plug the plugin on it, the plugin has an Object parameter.
  3. In the Object parameter, put the $(selector) of the nav carousel in the key 'target' or 'syncWith'. See example below:
$('.owl-exhibition').owlSync({
    target: $('.owl-nav')
});
  1. You can still pass the duration (in milliseconds) of the slide transition and the index of first slide:
$('.owl-exhibition').owlSync({
    syncWith: $('.owl-nav'),
    duration: 200, // this is an int variable that represents time in milliseconds (ms)
    startIndex: 3 // will link the carousels on the fourth slide.
});
  1. Note that the sync slides will have the .linked class, that allows you to style them.

Aditional usage information:

Object options has the $('.owl-nav') jQuery object and duration of slide transition. (example above)

Copyright (c) 2016 Luiz Filipe Machado Barni

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.