css div disable click code example
Example 1: disable click css
.avoid-clicks {
pointer-events: none;
}
Example 2: disable div click
// To disable:
document.getElementById('id').style.pointerEvents = 'none';
// To re-enable:
document.getElementById('id').style.pointerEvents = 'auto';
// Use '' if you want to allow CSS rules to set the value
Example 3: css disable button click
button.disabled{
pointer-events: none;
}