How can I enable/disable an element's click handler with CSS?

I am using it in JavaScript to enable and disable a div element:

$("#divbutton").css("pointer-events","auto");

But I want a property that enables and disables the element. How can I do that?

html

<div class="buttonSender" id="divbutton">Invia</div>

Leave a Comment