Open Popup (Image Gallery) from Link
See original GitHub issueFirst: Thank you very much for this great peace of code. One question left. Are there ways to open a gallery from a single Textlink?
Sample:
<div class="gallery-link">
<a href="#">Open the Gallery</a>
</div>
<div class="gallery">
<img src="" />
<img src="" />
<img src="" />
.
.
.
</div>
Thank you
Issue Analytics
- State:
- Created 10 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Open Gallery by link in Popup - Ultimate WordPress Plugins ...
This option will be useful if you don't want to show gallery thumbnails in your post or on your page, but still want...
Read more >How to open a lightbox gallery popup on clicking a button or ...
This tutorial will guide you how to open a lightbox gallery popup on clicking a button or text link. There are four steps...
Read more >Open Galleries In Lightbox From Text Link - FooPlugins
Using FooGallery, create a new gallery and add all the images that you want. In the Gallery Settings metabox, make sure you set...
Read more >Open Gallery from a link or sigle image - Support - Kriesi.at
I will look for a gallery plugin that offers a link directly to the lightbox modal – or use a freelance developer to...
Read more >Open Galleries In Lightbox From an IMAGE Link | WordPress.org
If you want the gallery to have a link instead of a featured image, then you can use the guide you shared with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can view a working example on CodePen.
HTML:
jQuery:
Thank you for the great piece of code.
Have an issue with
$(document).ready(function () { $(‘.gallery-link’).click(function () { jQuery(this).next().magnificPopup(‘open’); }); $(‘.gallery’).each(function () { jQuery(this).magnificPopup({ delegate: ‘a’, type: ‘image’, gallery: { enabled: true, navigateByImgClick: true }, fixedContentPos: false }); }); });
On .magnificPopup(‘open’) Error: Unable to get property ‘items’ of undefined or null reference Line: 930 in jquery.magnific-popup.js (v1.0.0 - 2015-01-03 )
Please help.
Thank you