The script changes the display attribute of every button even if the button is already in the right state. Bad idea - typically only one or two need to be changed and browsers can be slow at making visibility changes.
Changing from:
} else { // no radio is checked in this row if(!oli) inputs[0].style.visibility = 'hidden'; else inputs[0].style.visibility = 'visible'; if(dli) inputs[1].style.visibility = 'hidden'; else inputs[1].style.visibility = 'visible';
to this version which only changes the state when necessary:
} else { // no radio is checked in this row if(!oli) { if ( inputs[0].style.visibility != 'hidden' ) inputs[0].style.visibility = 'hidden'; } else { if ( inputs[0].style.visibility != 'visible' ) inputs[0].style.visibility = 'visible'; } if(dli) { if ( inputs[1].style.visibility != 'hidden' ) inputs[1].style.visibility = 'hidden'; } else { if ( inputs[1].style.visibility != 'visible' ) inputs[1].style.visibility = 'visible'; }
should assist without the need to remove the work of whoever made the change.