Popup image on click the link using Jquery | Sanwebcorner

Popup image on click the link using Jquery

Today will learn How to show image as a popup on click the link using Jquery. This is very simple concept will easily do with the help of jquery. You can customize the popup image by editing jquery.fancybox file. In this file you can set the speed of the animation open image in the popup and also you can set the loop and opacity, zoom option etc... 

In this example you should add the image to div with the id name is hidden-content that image will display in the popup field. And then you just call the id hidden-content in the <a> tag like below code after included necessary jquery and javascript and css files. This post shows image in the popup window while clicking the link. You can also add the link in the popup image by using <a> tag in your hidden-content div.

<a data-fancybox data-src="#hidden-content" href="javascript:;">
Click link View popup image

I hope this example will help you how to open an image in the popup mode on click the link. Below is the full code you can download code and use it your projects. And also i provided the demo link check it out below. I think this is very useful to you, If it is useful please support us by sharing this post to social media. Thanks lot.

Popup image on click the url using Jquery

Code for onclick Popup image:

<!DOCTYPE html>
<meta charset="utf-8">
<title>Popup image on click the link using Jquery</title>

<!-- CSS -->
<link rel="stylesheet" type="text/css" href="jquery.fancybox.css">
<center><!-- Your HTML content goes here -->
<div style="display: none;" id="hidden-content">
<img src="sanwebcorner.jpg" />
<a data-fancybox data-src="#hidden-content" href="javascript:;">
Click link View popup image

<a href="http://www.sanwebcorner.com">www.sanwebcorner.com</a>
<!-- JS -->
<script src="http://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="jquery.fancybox.js"></script>

Post a comment


360 degree view product image 3d rotate 3d text 3step-form Accordion menu ajax All Browsers Animated Background Gradient animation audio controller auto complete Best accordion menu bootstrap Bootstrap form validation border bounce effect on hover Breadcrumb calculate age by dob calendar Captcha change image on mouse move color chooser countdown Counter on scroll create random number Css css animation css buttons css hover css3 customized upload Button Date picker delete data from table Different scroll speed donation form download zip email otp verification email verifier Embed eventlist Expanding Menu feedbck form flash news section close button full screen menu Google custom search Google Maps Google reCAPTCHA Google site search gradient heart animation hide menu Horizontal News ticker Hover Htm Html html dropdown html form html form validation html5 html5 form validation Iframe image hover increment decrement textbox value based on select box Javascript javascript validation Jquery jquery validation js Layered image effect on mouse hover lock & unlock page scroll marquee marquee with close button mobile number validation mobile otp login Multi-level-drop-down-menu multi-level-form multi-select-checkbox Multi-Step-form Multiple File Upload in PHP mysql News ticker on hover change text to image our team page password generator password strength checker paypal form paypal html form Photoshop PHP php mailer populate html selectbox Popup image on click the link pure css Question type form random number generate Random password Redirect page Based on the select box while submit the form responsive responsive menu responsive popup box Responsive Vertical Time line design rotate image selectbox based on select box simple coming soon page simple countdown based on end date simple typing effect slider sliding tab sms otp login statistic counter on scroll switch tag shape team member Time picker toggle toggle view transparent button underline animation up down slide validation vertical fixed sidebar Webtips whatsapp link website Whislist Youtube