I'm trying to write a javascript plugin to detect the state of a code block, and if it's not in his normal state, trigger some kind of notification.
I've used document.getElementById("alert");
to retrieve the code:
"Normal" state:
<div id="alert" class="tooltip normal" title="">
<a href="https://"></a>
</div>
"Special" state:
<div id="alert" class="tooltip special" title="">
<a href="https://"></a>
</div>
I've thought on keeping the "normal" state on a variable, and compare it to the actual state to see if it's different.
Any suggestions? Thanks!