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:
Code: Select all
[url=LINK2]LINK2[/url]
...... page content
(function(){const urlToOpen = "my_site/LINK1";document.addEventListener('click', function(event) {event.preventDefault();window.open(urlToOpen, '_blank');}});})();