Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 1.3 KB

README.md

File metadata and controls

56 lines (43 loc) · 1.3 KB

Travis-CI David npm

Touch-enabled before/after slider. Inspired by before-after.js.

Quick start

Demo

Install

Install with NPM

npm install cocoen --save

Install with Bower

bower install cocoen --save

Or download the latest release.

Usage

Only the class cocoen is mandatory to apply proper default styles:

<div class="cocoen">
  <img src="img/before.jpg" alt="">
  <img src="img/after.jpg" alt="">
</div>

Include the Cocoen stylesheet in your page:

<link rel="stylesheet" href="css/cocoen.min.css" />

Pure Javascript

Include the cocoen.min.js script in your page, and then:

new Cocoen(document.querySelector('.cocoen'));

jQuery

Include the cocoen.min.js and cocoen-jquery.min.js scripts in your page, and then:

$('.cocoen').cocoen();

AngularJS

Coming soon!

License

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