i have a popup on my site which opens when user clicks anywhere on page
I wan to disable it from opening when user clicks on a specific element (in this case a DIV which has ID and CLASS)
(clicking on this specific DIV, will open a direct link to another page on site)
Here is how it is:
<body>
<div id="ID1">
<button class="class1"> goes to LINK2 </button>
</div>
...... page content
<script(function(){const urlToOpen = "my_site/LINK1";document.addEventListener('click', function(event) {event.preventDefault();window.open(urlToOpen, '_blank');}});})();</script>
</body>
i want to disable opening LINK1 when user clicks on button with calss1 or div with ID1