I would like to add a download link in my Fancybox. I'm new in programming and I can't seem to figure out what code to use and where to put it. Thank you in advance.
I'm using FancyBox v3.2.10.
Here's the code:
<?php $directory = "images/"; ?>
<?php $dir = glob ($directory . "*.{jpg,png,gif,JPG}",GLOB_BRACE) ?>
<?php foreach ($dir as $key => $value): ?>
<div class="thumb">
<a href="<?php echo $value; ?>" data-fancybox="images" data-caption="<?php echo $value; ?>">
<img src="<?php echo $value; ?>" alt="" />
</a>
</div>
<?php endforeach; ?>
Try something like this -
$('[data-fancybox="images"]').fancybox({
buttons : [
'download',
'thumbs',
'close'
]
});