bcswipe
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/bcswipe package

2.0.5 • Public • Published

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.

Package Sidebar

Install

npm i bcswipe

Weekly Downloads

36

Version

2.0.5

License

MIT

Unpacked Size

7.36 kB

Total Files

5

Last publish

Collaborators

  • briggysmalls