I'm using Foundation 6's "Reveal" to create modals. When I use a reveal trigger on a link that has a href, the modal pops up but then the page goes to the link as well. I only want it to go to the link if there is no JS, it's also for SEO.
I've checked the Reveal (http://foundation.zurb.com/sites/docs/reveal.html) and Foundation's javascript utilities (http://foundation.zurb.com/sites/docs/javascript-utilities.html) without any luck.
Try something like the following.
$('[data-open]').on('click', function(e) {
e.preventDefault();
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With