Can someone point me towards a solution for the following? I\'m trying to find a JS equivalent for this jQuery code:
var formSelector = \'my selector here\';
Here's a really simple solution using data attributes.
document.querySelector('#click').addEventListener('click', function(e){ if(e.currentTarget.dataset.triggered) return; e.currentTarget.dataset.triggered = true; alert('clicked'); })
Click me