I have two css selectors linked up to an html element. Onmousedown javascript is supposed to change the class to 'closeMenuButtonActive' and onmouseup it should wait 500ms and then change the class name to 'closeMenuButtonNotActive'. For some reason this code isn't working correctly! I tried doing alert(this.className);
to see what was going on, the alert said the correct closeMenuButtonNotActive. The strange part is that I looked at the element in the inspector and the class name hadn't changed! Here is my inline javascript code:
<div id="closeMenuButton" class="closeMenuButtonNotActive" onmousedown="this.className = 'closeMenuButtonActive';" onmouseup="window.setTimeout(function(){this.className = 'closeMenuButtonNotActive';},500);">