Trying to make some good accessible cards but having trouble with IE11 (no surprise). Pretty sure I'm missing something obvious? I know it is an issue with the js but brain is having trouble getting in to gear :/
const cards = document.querySelectorAll('.card');
Array.prototype.forEach.call(cards, card => {
let down, up, link = card.querySelector('h4 a');
card.style.cursor = 'pointer';
card.onmousedown = () => down = +new Date();
card.onmouseup = () => {
up = +new Date();
if ((up - down) < 200) {
link.click();
}
}
});