java.js
// Allows you to toggle a variable on or off
Allows you to toggle a variable on or off
Allows you to toggle a variable on or off
function toggleVariable(varToToggle, elementToColor, color1, color2, textcolor1, textcolor2, text1, text2) {
	if (varToToggle === 0) {
		changeObjectColor(elementToColor, color1, textcolor1);
		document.getElementById(elementToColor).innerHTML = text1;
		return 1;
	} else {
		changeObjectColor(elementToColor, color2, textcolor2);
		document.getElementById(elementToColor).innerHTML = text2;
		return 0;
	}
}
function toggleVariable ( varToToggle , elementToColor , color1 , color2 , textcolor1 , textcolor2 , text1 , text2 ) { if ( varToToggle === 0 ) { changeObjectColor ( elementToColor , color1 , textcolor1 ) ; document . getElementById ( elementToColor ) . innerHTML = text1 ; return 1 ; } else { changeObjectColor ( elementToColor , color2 , textcolor2 ) ; document . getElementById ( elementToColor ) . innerHTML = text2 ; return 0 ; } }
Allows you to toggle a variable on or off
Allows you to toggle a variable on or off
// When enabled (all 1 objects) // When disabled (all 2 objects)