before-after.js

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

  • 所有者: jotform/before-after.js
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

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

  • 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)

DEPENDENCIES

USAGE

$('.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.

LICENSE

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

主要指标

概览
名称与所有者jotform/before-after.js
主编程语言JavaScript
编程语言CSS (语言数: 3)
平台
许可证MIT License
所有者活动
创建于2015-03-06 08:39:44
推送于2023-03-15 08:08:42
最后一次提交2022-03-17 15:45:05
发布数0
用户参与
星数360
关注者数46
派生数63
提交数51
已启用问题?
问题数13
打开的问题数8
拉请求数6
打开的拉请求数3
关闭的拉请求数2
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?