Trying to set it so that the current open section of the Jquery Ui accordion has pointer events set to none, so that I can not click it again. Here is the code I have so far however it is broken.
if ($("#accordion h3").hasClass("ui-state-active")) {
this.style.pointerEvents = "none";
}
else {
this.style.pointerEvents = "auto";
}