onclick image zoom jquery demo means Zoom Image Onclick using jquery. A plugin to enlarge images on touch, click, or mouseover.
Thumbnails click image zoom in lightbox. Image Popup jQuery plugin can be used to make images pop when clicked.
Attach the function to your image within the document. Done.
<img id="portfolio" src="https://source.unsplash.com/CkW90N_oro8/800x400" />
$(function(){
$('#portfolio').imageZoom();
});
Apply the image zoom functionality to all images in a portfolio.
<div class="my-portfolio">
<img class="portfolio-image" src="1.jpg" alt="portfolio 1" />
<img class="portfolio-image" src="2.jpg" alt="portfolio 2" />
<img class="portfolio-image" src="3.jpg" alt="portfolio 3" />
</div>
$(function(){
$('.my-portfolio').imageZoom({
$(this).imageZoom();
});
});
Determine the zoom level. Default: ‘150’.
$(function(){
$('.my-portfolio').imageZoom({
$(this).imageZoom({
zoom: 200
});
});
});
Don’t Miss : Jquery Image Zoom Plugin Examples
Removing Zoom
$('#portfolio').zoom(); // add zoom
$('#portfolio').trigger('zoom.destroy'); // remove zoom
I hope you get an idea about onclick image zoom jquery demo.