JSFiddle - React, Tailwind, and code Playground
by shamaleyte
HTML
<script src="https://cdn2.hubspot.net/hubfs/2480790/Assets%202017/fancybox/jquery.fancybox.min.js"></script>
<link rel="stylesheet" href="https://cdn2.hubspot.net/hubfs/2480790/Assets%202017/fancybox/jquery.fancybox.min.css">
<a href="https://cdn2.hubspot.net/hubfs/2480790/%20%5Bnot%20used%20-%20oct%202017%5D/[email protected]" class="fancybox" rel="ligthbox">
<img src="https://cdn2.hubspot.net/hubfs/2480790/%20%5Bnot%20used%20-%20oct%202017%5D/[email protected]" >
<a/>
JavaScript
var activeElem = null;
$(".fancybox").fancybox({
helpers: {
title: {
type: 'inside'
}
},
caption: function() {
return "<a class='fancybox-download' href='#' download>Download</a>";
},
afterShow: function(instance, current) {
activeElem = current.opts.$orig;
}
});