Multiple toggling switches

After reading Lucky & Mark’s posts about the value not getting assigned, I tried the following to assign the value via javascript. This seems to work well and the double click (or second click) behavior is gone - YAY!..

hypeDocument.setElementProperty(element, 'opacity', 1);

element.addEventListener('click', function() {   
    this.style.opacity = (this.style.opacity == 1) ? 0 : 1;            
});

toggles2.hype.zip (11.0 KB)

3 Likes