document.querySelectorAll('a').forEach(function(item) { item.addEventListener('click', function(e) { e.preventDefault(); }); });