Foundation's modal is not working for me in my project.
I've confirmed Foundation and jQuery are loaded as well as the CSS for the Foundation Modal to work but it's not triggering on click as is.
Interestingly, if you run
$(document).ready(function(){
var popup = new Foundation.Reveal($('#videoModal'));
popup.open();
});
In the browser console, the modal appears. So, I feel confident the js and css are available.
I just can't resolve why the click event on the anchor is not firing it as it should. I've followed the advice on this page: https://foundation.zurb.com/sites/docs/reveal.html
My Test Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Testing Modal from Foundation</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/assets/dist/styles/app.css">
</head>
<body>
<div style="margin-top: 200px;" class="video-callout">
<a data-open="videoModal">
<h6>Watch the video</h6>
</a>
</div>
<div class="reveal" id="videoModal" data-reveal>
<h1>Hey!</h1>
</div>
<script src="/assets/dist/scripts/vendor/jquery.min.js"></script>
<script src="/assets/dist/scripts/vendor/foundation.min.js"></script>
</body>
</html>