Show The Before And After Differences Between Images - Image Comparison

Show The Before And After Differences Between Images - Image Comparison
File Size: 4.86 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A very small (1kb minified) and dead simple to use jQuery responsive image comparison plugin to show the differences between before and after images that responds to mouse movement as well as touch tap.

How to use it:

1. Make sure "jquery-image-comparison.min.css", "jQuery" & "jquery-image-comparison.min.js" are included correctly in the document.

<!-- jQuery -->
<script src="jquery.min.js"></script>
<!-- jQuery Image Comparison -->
<link rel="stylesheet" href="jquery-image-comparison.min.css">
<script src="jquery-image-comparison.min.js"></script>

2. The html structure for the image comparison interface with a horizontal slider.

<ul class="comparison horizontal">
  <li><img src="before.jpg" alt="Before Image"></li>
  <li><img src="after.jpg" alt="After Image"></li>
</ul>

3. The html structure for the image comparison interface with a vertical slider.

<ul class="comparison vertical">
  <li><img src="before.jpg" alt="Before Image"></li>
  <li><img src="after.jpg" alt="After Image"></li>
</ul>

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