I'm working in AEM 6.5 and have a tag that opens a modal based on the data-resource value.
<a href="#" class="modal-anchor prevent-scroll" data-resource="/legal/legal-501251/jcr:content.json">Restrictions apply</a>
However, when the user selects a different option, which loads new content, a hashtag gets called (from the href="#") instead of the data-resource.
The relevant part of my JSON looks like this:
var PROD_LIST = [
{
product_name: 'Product 1',
product_img: '/content/dam/images/drawer/desktop/cf-154972.png',
mobile_img: '/content/dam/images/drawer/mobile/cf-154972.png',
details_link: '/content/en/legal/legal-501251/jcr:content.json',
JavaScript
var linkText = device.details_link_text ? device.details_link_text :
I'm wondering why the link works on initial page load, but after the user changes an option and new content loads, but with the exact same link, why is the "details_link" ignored?