Skip to content

Super lightweight jQuery plugin to enable swipe gestures for Bootstrap 3 carousels on iOS and Android.

License

Notifications You must be signed in to change notification settings

briggySmalls/bcSwipe

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status npm npm bundle size

Bootstrap Carousel Swipe (bcSwipe)

Super lightweight jQuery plugin to enable swipe gestures for Bootstrap 3 carousels on iOS and Android.

Installation

Install the package using npm:

npm install bcswipe

This package comes with both a browser-ready, minified script, and an ES5 module.

HTML

Include the distribution script directly into the browser.

<!-- Bootstrap is required -->
<script src="bootstrap/js/bootstrap.js"></script>
<script src="./node_modules/bcswipe/dist/jquery.bcSwipe.min.js"></script>

ES5

Import the ES5 module using the syntax appropriate for your project:

// Import plugin when 'jQuery' global is available
import 'bcswipe';
// Import plugin when 'jQuery' global is available
require('bcswipe');

Usage

Adjusting threshold will determine how long a swipe must be to move to the next carousel slide.

// Tweak settings
$('.carousel').bcSwipe({ threshold: 50 });

Development

Install developement dependencies as usual with:

npm install --dev

The browser-friendly version of the source can be generated with:

npm run build

Credits

This project was forked from bcSwipe and all credit must go to Mark Shiraldi.

About

Super lightweight jQuery plugin to enable swipe gestures for Bootstrap 3 carousels on iOS and Android.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 50.3%
  • HTML 49.7%