jQuery Plugin To Compare Two Layered Images - ImgCmp

jQuery Plugin To Compare Two Layered Images - ImgCmp
File Size: 14.5 KB
Views Total: 528
Last Update:
Publish Date:
Official Website: Go to website
License: MIT

ImgCmp is a super lightweight and CSS-less jQuery plugin that allows to show the differences between two layered images using a slider.

How to use it:

1. Add the latest version of jQuery library and jQuery ImgCmp plugin's JavaScript file to the webpage.

<script src="//code.jquery.com/jquery-3.1.1.slim.min.js"></script>
<script src="imgcmp.js"></script>

2. Create a DIV container for the image comparison area.

<div id="demo"></div>

3. Initialize the plugin and specify the before / after images you'd like to compare.

$( '#demo' ).imgCmp({
  before : 'before.jpg',
  after : 'after.jpg'

This awesome jQuery plugin is developed by rashid2538. For more Advanced Usages, please check the demo page or visit the official website.