CodePen
codepen.io › insidethediv › pen › wvJRqOv
Onclick image popup javascript and jQuery
$( document ).ready(function(){ // without animation /* $("#close-btn").click(function(){ $(".small-image").removeClass('active'); $("#show_image_popup").hide(); }) $(".small-image").click(function(){ // add active class $(this).addClass('active'); var image_path = $(this).attr('src'); $("#show_image_popup").hide(); // now st this path to our popup image src $("#show_image_popup").show(); $("#large-image").attr('src',image_path); }) */ // with animation $("#close-btn").click(function(){ // remove active class from all images $(".small-image").removeClass('active'); $("#show_image_popup").slide
CodePen
codepen.io › codeorum › embed › abNKdvo
CodePen Embed - Simple image popup effect with vanilla js and css animation
function initImagePopup(elem){ // check for mouse click, add event listener on document document.addEventListener('click', function (e) { // check if click target is img of the elem - elem is image container if (!e.target.matches(elem +' img')) return; else{ var image = e.target; // get current clicked image // create new popup image with all attributes for clicked images and offsets of the clicked image var popupImage = document.createElement("img"); popupImage.setAttribute('src', image.src); popupImage.style.width = image.width+"px"; popupImage.style.height = image.height+"px"; popupImage.st
CodePen
codepen.io › JiiB › pen › xgdOjw
Simple Image Gallery with magnific-popup.js
<div class="container"> <h1>Simple Image Gallery with magnific-popup.js</h1> <p><section class="img-gallery-magnific"> <div class="magnific-img"> <a class="image-popup-vertical-fit" href="https://unsplash.it/974/?random" title="9.jpg"> <img src="https://unsplash.it/974/?random" alt="9.jpg" /> <i class="fa fa-search-plus" aria-hidden="true"></i> </a> </div> <div class="magnific-img"> <a class="image-popup-vertical-fit" href="https://unsplash.it/900/?random" title="10.jpg"> <img src="https://unsplash.it/900/?random" alt="10.jpg" /> <i class="fa fa-search-plus" aria-hidden="true"></i> </a> </div>
CodePen
codepen.io › tag › image popup
Pens tagged 'image popup' on CodePen
CodePen doesn't work very well without JavaScript · We're all for progressive enhancement, but CodePen is a bit unique in that it's all about writing and showing front end code, including JavaScript. It's required to use most of the features of CodePen · Need to know how to enable it?
CodePen
codepen.io › webrav › pen › ZrBNQR
Video Pop Up on click image or link - Youtube, Vimeo
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Test</title> <script type="text/javascript" src="https://code.jquery.com/jquery-1.12.1.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.css" /> </head> <body> <a class="popup-youtube" href="https://www.youtube.com/watch
CodePen
codepen.io › bluminethemes › pen › reEJZa
Magnific Popup - Open custom gallery on button click
<h3>Magnific Popup - Open custom gallery on button click</h3> <ul> <li> <a href="#gallery-1" class="btn-gallery">Gallery 1</a> </li> <li> <a href="#gallery-2" class="btn-gallery">Gallery 2</a> </li> <li> <a href="#gallery-3" class="btn-gallery">Gallery 3</a> </li> <li> <a href="#gallery-4" class="btn-gallery">Gallery 4</a> </li> </ul> <div id="gallery-1" class="hidden"> <a href="https://images.unsplash.com/photo-1462774603919-1d8087e62cad?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=0ebd884b4d6ac379f42146a2b26fbf2e">Image 1</a> <a href="https://images.unsplash.com/photo-1460499593944-39e14f96a8c6
CodePen
codepen.io › JiiB › embed › xgdOjw
CodePen Embed - Simple Image Gallery with magnific-popup.js
<div class="container"> <h1>Simple Image Gallery with magnific-popup.js</h1> <p><section class="img-gallery-magnific"> <div class="magnific-img"> <a class="image-popup-vertical-fit" href="https://unsplash.it/974/?random" title="9.jpg"> <img src="https://unsplash.it/974/?random" alt="9.jpg" /> <i class="fa fa-search-plus" aria-hidden="true"></i> </a> </div> <div class="magnific-img"> <a class="image-popup-vertical-fit" href="https://unsplash.it/900/?random" title="10.jpg"> <img src="https://unsplash.it/900/?random" alt="10.jpg" /> <i class="fa fa-search-plus" aria-hidden="true"></i> </a> </div>
CouponXoo
couponxoo.com › onclick-image-popup-jquery-codepen
Onclick Image Popup Jquery Codepen - Updated 2022
October 02, 2013 Add pages in jquery lightbox popup pop up window. I have a question. Can I make a lightbox which is not for an image but a page? October 24, 2013 One image on a page that is a link to launch css lightbox gallery. How your light box, and most others works is, you click on a photo and it pops up the light box. ... Zoom image onclick using JavaScript CodePen.
CodePen
codepen.io › tag › simple popup
Pens tagged 'simple popup' on CodePen
CodePen doesn't work very well without JavaScript · We're all for progressive enhancement, but CodePen is a bit unique in that it's all about writing and showing front end code, including JavaScript. It's required to use most of the features of CodePen · Need to know how to enable it?
CodePen
codepen.io › alidz › pen › MabEaE
image-modal-responsive
This code was written so that you don't have to write multiple modal divs --> <script> $(document).ready(function() { var $lightbox = $('#lightbox'); $('[data-target="#lightbox"]').on('click', function(event) { var $img = $(this).find('img'), src = $img.attr('src'), alt = $img.attr('alt'), css = { 'maxWidth': $(window).width() - 100, 'maxHeight': $(window).height() - 100 }; $lightbox.find('img').attr('src', src); $lightbox.find('img').attr('alt', alt); $lightbox.find('img').css(css); }); $lightbox.on('shown.bs.modal', function (e) { var $img = $lightbox.find('img'); $lightbox.find('.modal-dial
CodePen
codepen.io › bluminethemes › pen › bpPvvb
Magnific Popup - Open gallery with single image
<h3>Magnific Popup - Open gallery with single image</h3> <ul> <li> <a href="#gallery-1" class="btn-gallery"> <img src="https://images.unsplash.com/photo-1462774603919-1d8087e62cad?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=0ebd884b4d6ac379f42146a2b26fbf2e" alt="" /> </a> </li> <li> <a href="#gallery-2" class="btn-gallery"> <img src="https://images.unsplash.com/photo-1445295029071-5151176738d0?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=d1b06f7f69fb043b7d35a48180c5668d" alt="" /> </a> </li> <li> <a href="#gallery-3" class="btn-gallery"> <img src="https://images.unsplash.com/photo-1446776858070-70c
CodePen
codepen.io › mukul6996 › pen › PbWrKz
Custom image popup
<div class="mask"></div> <ul class="img-list"> <li><a href=""><img src="https://images.unsplash.com/photo-1467189386127-c4e5e31ee213?dpr=1&auto=format&fit=crop&w=767&h=511&q=80&cs=tinysrgb&crop=" alt=""></a></li> <li><a href=""><img src="https://images.unsplash.com/photo-1463569643904-4fbae71ed917?dpr=1&auto=format&fit=crop&w=767&h=511&q=80&cs=tinysrgb&crop=" alt=""></a></li> <li><a href=""><img src="https://images.unsplash.com/photo-1460891053196-b9d4d9483d9b?dpr=1&auto=format&fit=crop&w=767&h=495&q=80&cs=tinysrgb&crop=" alt=""></a></li> <li><a href=""><img src="https://images.unsplash.com/uploads/141219200475673afcb68/f5bd8360?dpr=1&auto=format&fit=crop&w=767&h=511&q=80&cs=tinysrgb&crop=" alt=""></a></li> </ul>
CodePen
codepen.io › DominicFrancois › pen › nMQZbq
Pop-up Dialog Box (LIGHTBOX)
<p class="pop-up-button">Pop Up</p> <div class="pop-up"> <span>x</span> <div class="pop-up-text"> <h1>Heading 1</h1> <p>Some sample pop-up text.</p> <img src="https://images.unsplash.com/photo-1474244707578-17999c7d3fc4"/> </div> </div> <div class="pop-up-container"> </div> <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>