Skip to content

alanbalcazar/before-after.js

 
 

Repository files navigation

before-after.js

A simple and responsive image comparison slider

Comparison sliders are nothing new. There are even pure CSS implementations that is nothing but short of amazing. However, I wasn’t able to find a truly responsive one that was simple enough for our needs. This gave me the chance (and excuse) to build one myself that can be used anywhere.

The Medium article details each decision made along the way.

DEMO

Image comparison

UPDATES

  • March 9th: I was finally able to remove the jQuery Mobile dependency and handle it with native events. If you wish to help, mobile testing is much appreciated since I can only test a limited number devices.

DEPENDECIES

USAGE

Simply copy the contents of the sample.html to your own page. All links are called from a CDN.

LICENSE

The MIT License (MIT) Copyright (c) 2015 JotForm

About

An Image Comparision Slider: See an example demo here: http://www.jotform.com/formscentral/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 61.2%
  • CSS 26.9%
  • HTML 11.9%