I am using the default debut theme and i am trying to open the fancybox popup on the click of image. I have uploaded the css and js using the assets folder and i have included the css and js into the theme.liquid before head tag close. Also added the script in my custom.js script.
I have given the piece of my code below. Any one can help me on the same please?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My page</title>
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="jquery.fancybox.min.css">
<!-- JS -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="jquery.fancybox.min.js"></script>
<script src="custom-scripts.js"></script>
</head>
<body>
<a href="image.jpg">
<img src="thumbnail.jpg" alt="" />
</a>
</body>
</html>
2
Answers
According to Fancybox documentation to enable a gallery you need to update
a
tag parameters according to documentationThis attribute play role to activate fancy box gallery
data-fancybox="gallery"