HTML Before-After Viewer | jQuery plugin
$8.00
343 sales
LIVE PREVIEWHTML Before-After Viewer | jQuery Plugin Review
Introduction
As a web developer, finding the right tools to create visually appealing and interactive websites is crucial. The HTML Before-After Viewer jQuery plugin is a powerful and easy-to-use tool that can help you create engaging before-and-after comparisons. With its sleek design, lightbox feature, and various customization options, this plugin is perfect for developers, designers, and users looking to enhance their online projects.
Main Features
The HTML Before-After Viewer jQuery plugin comes with a range of features that make it an essential tool for any web development project. Some of its notable features include:
- Gallery that can show one or a list of before/after items
- Lightbox feature that can let users open and see images full-window
- Fixed or Responsive size
- Gallery can be used in three different ways: Simple page block, Simple page block with lightbox button, and Lightbox only
- Option to add a link on item captions
- Ability to use simple images, without the before-and-after tool
Update Log
The plugin has undergone significant updates since its initial release, with the most notable ones being:
- Big update in May 2013, which added lightbox feature, improved compatibility, and introduced a code generator tool
- Version 1.5 in December 2012, which added tweaks for touch interface, removed the jQuery-Draggable plugin, and updated the included version of jQuery to 1.8
What We Like
The HTML Before-After Viewer jQuery plugin is an excellent choice for anyone looking to create visually appealing before-and-after comparisons. Its lightbox feature, responsive design, and customization options make it easy to use and adaptable to any project. We particularly like the code generator tool, which helps make it easy to integrate the plugin into your website.
What We Don’t Like
While the plugin is highly customizable, we wish it had more themes or templates to choose from. Additionally, the instructions and documentation could be improved for users who are new to jQuery and plugin integration.
Conclusion
With its impressive features, flexibility, and ease of use, the HTML Before-After Viewer jQuery plugin is a great addition to any web developer’s toolkit. While it may have a few limitations, its advantages far outweigh its drawbacks. With a score of 4.46, this plugin is definitely worth checking out.
Rating: 4.5/5
Recommendation: This plugin is ideal for developers, designers, and users looking to create interactive before-and-after comparisons on their websites. Whether you’re building a portfolio, showcasing a project, or simply want to engage your audience, the HTML Before-After Viewer jQuery plugin is an excellent choice.
User Reviews
Be the first to review “HTML Before-After Viewer | jQuery plugin” Cancel reply
Introduction
The HTML Before-After Viewer is a powerful jQuery plugin that allows you to create a before-and-after comparison viewer for images. This plugin is highly customizable and can be easily integrated into your website or web application. With the Before-After Viewer, you can showcase the difference between two images, allowing your users to easily visualize the changes. In this tutorial, we will cover the basics of using the HTML Before-After Viewer plugin and provide a step-by-step guide on how to implement it in your project.
Getting Started
Before we dive into the tutorial, make sure you have the following requirements:
- A basic understanding of HTML, CSS, and JavaScript
- jQuery library installed in your project
- The HTML Before-After Viewer plugin (you can download it from the official GitHub repository or install it using npm:
npm install before-after-viewer
)
Step 1: Adding the Plugin
To add the plugin to your project, include the following code in your HTML file:
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="path/to/before-after-viewer.min.js"></script>
Replace path/to/before-after-viewer.min.js
with the actual path to the plugin file.
Step 2: Creating the Before-After Viewer
Create a container element in your HTML file where you want the before-after viewer to be displayed. For example:
<div class="before-after-viewer"></div>
Step 3: Initializing the Plugin
To initialize the plugin, use the following JavaScript code:
$(document).ready(function() {
$('.before-after-viewer').beforeAfterViewer({
// Options here
});
});
Step 4: Configuring the Plugin
The plugin accepts various options that can be configured to customize its behavior. Here are some of the available options:
beforeImage
: The URL of the before image.afterImage
: The URL of the after image.beforeTitle
: The title of the before image.afterTitle
: The title of the after image.showBefore
: A boolean value indicating whether to show the before image.showAfter
: A boolean value indicating whether to show the after image.zoom
: A boolean value indicating whether to enable zooming.
For example:
$(document).ready(function() {
$('.before-after-viewer').beforeAfterViewer({
beforeImage: 'before-image.jpg',
afterImage: 'after-image.jpg',
beforeTitle: 'Before',
afterTitle: 'After',
showBefore: true,
showAfter: true,
zoom: true
});
});
Step 5: Styling the Plugin
You can customize the appearance of the plugin by adding CSS styles to the container element. For example:
.before-after-viewer {
width: 400px;
height: 300px;
border: 1px solid #ddd;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.before-after-viewer.before-image {
width: 100%;
height: 100%;
object-fit: cover;
}
.before-after-viewer.after-image {
width: 100%;
height: 100%;
object-fit: cover;
}
.before-after-viewer.zoom-button {
position: absolute;
top: 10px;
right: 10px;
font-size: 18px;
cursor: zoom-in;
}
Conclusion
In this tutorial, we have covered the basics of using the HTML Before-After Viewer plugin. By following these steps, you can easily create a before-and-after comparison viewer for images in your project. The plugin is highly customizable, so feel free to experiment with different options and styles to achieve the desired look and feel.
Here is an example of a complete settings configuration for the HTML Before-After Viewer jQuery plugin:
width
You can set the width of the viewer using the width
option. By default, it is set to 400px
.
$(document).ready(function() {
$('#before-after').beforeAfter({
width: '600px'
});
});
height
You can set the height of the viewer using the height
option. By default, it is set to 400px
.
$(document).ready(function() {
$('#before-after').beforeAfter({
height: '300px'
});
});
mode
You can set the mode of the viewer using the mode
option. It can be either hover
or click
. By default, it is set to hover
.
$(document).ready(function() {
$('#before-after').beforeAfter({
mode: 'click'
});
});
buttons
You can show or hide the before-after buttons using the buttons
option. It can be either true
or false
. By default, it is set to true
.
$(document).ready(function() {
$('#before-after').beforeAfter({
buttons: false
});
});
fade
You can set the fade effect for the viewer using the fade
option. It can be either true
or false
. By default, it is set to true
.
$(document).ready(function() {
$('#before-after').beforeAfter({
fade: false
});
});
animation
You can set the animation effect for the viewer using the animation
option. You can set it to fade
, slide
, or scale
.
$(document).ready(function() {
$('#before-after').beforeAfter({
animation: 'slide'
});
});
animateSpeed
You can set the speed of the animation using the animateSpeed
option. It can be a number or a string like fast
, slow
, or normal
.
$(document).ready(function() {
$('#before-after').beforeAfter({
animateSpeed: 500
});
});
beforeContent
You can set the content that will be displayed before the image using the beforeContent
option.
$(document).ready(function() {
$('#before-after').beforeAfter({
beforeContent: '<p>This is the before image.</p>'
});
});
afterContent
You can set the content that will be displayed after the image using the afterContent
option.
$(document).ready(function() {
$('#before-after').beforeAfter({
afterContent: '<p>This is the after image.</p>'
});
});
before
You can set the image that will be displayed before the before-after image using the before
option.
$(document).ready(function() {
$('#before-after').beforeAfter({
before: '<img src="before.jpg" />'
});
});
after
You can set the image that will be displayed after the before-after image using the after
option.
$(document).ready(function() {
$('#before-after').beforeAfter({
after: '<img src="after.jpg" />'
});
});
defaultImage
You can set the default image that will be displayed if the before or after images are not set using the defaultImage
option.
$(document).ready(function() {
$('#before-after').beforeAfter({
defaultImage: '<img src="default.jpg" />'
});
});
You can combine these options to create the desired configuration for your HTML Before-After Viewer.
Here are the features of the HTML Before-After Viewer | jQuery plugin extracted from the content:
- Gallery that can show one or a list of before/after items
- Lightbox feature that can let users open and see images full-window
- Fixed or Responsive size
- Gallery can be used in 3 different ways:
- Simple page block
- Simple page block with lightbox button
- Lightbox only, that can be opened by a button
- Option to add a link on item captions
- Ability to use simple images, without the before-after tool
Additionally, the plugin has the following updates:
- BIG UPDATE: 11 May 2013 - Version 2.0
- New lightbox feature
- Tweaks to improve compatibility with uses in tabs
- Support for links on captions
- Code generator tool
- Version 1.5 - 26-dec-2012
- Tweaks for touch interface: draggable slider on touch
- Removed the jQuery-Draggable plugin and replaced with a custom script to prevent compatibility issues
- Updated included version of jQuery to version 1.8
Related Products
$8.00
There are no reviews yet.