Use CSS to make a element not clickable

CSS code

.element {
    pointer-events: none;
}

JavaScript code

let p = document.getElementsByTagName('p');
for (let i = 0; i < p.length ;i++) {
  p[i].getElementsByTagName('span')[1].onclick = function() { return false;};
}

Leave a Reply