- Notifications
You must be signed in to change notification settings - Fork64
An Image Comparision Slider: See an example demo here:http://www.jotform.com/formscentral/
License
jotform/before-after.js
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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.
TheMedium article details each decision made along the way.
- Performance improvements (Feb, 2017)
- before-after is now a jquery plugin, special thanks to@ramblex. Also CDN links updated and fixed a few issues.(Feb, 2016)
- 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. (March, 2015)
- jQuery for ease
$('.ba-slider').beforeAfter();Or you can simply copy the contents of the sample.html to your own page. All links are called from a CDN.
$('.ba-slider').each(function(){ $(this).beforeAfter();});(function ($, Drupal) { Drupal.behaviors.pronatura_image_comparison = { attach: function (context, settings) { $('.ba-slider').each(function(){ $(this).beforeAfter(); }); } }; })(jQuery, Drupal);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
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors8
Uh oh!
There was an error while loading.Please reload this page.
