GithubHelp home page GithubHelp logo

propek / cocoen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from koenoe/cocoen

0.0 1.0 0.0 6.84 MB

Much like the caterpillar, your image will undergo a clear transformation with Cocoen. Making comparison really easy, it’s as straightforward way of seeing your images in a new light.

License: MIT License

JavaScript 91.35% CSS 8.65%

cocoen's Introduction

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" />

Plain Javascript

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

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

Multiple Cocoens in one page:

document.querySelectorAll('.cocoen').forEach(function(element){
  new Cocoen(element);
});

jQuery

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

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

License

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

cocoen's People

Contributors

koenoe avatar cfxd avatar tannerplauche avatar cafferata avatar kohlmannj-nyt avatar

Watchers

James Cloos avatar

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.