Skip to content

Instantly share code, notes, and snippets.

Created April 15, 2010 16:48
Show Gist options
  • Save anonymous/367346 to your computer and use it in GitHub Desktop.
Save anonymous/367346 to your computer and use it in GitHub Desktop.
function moveIt(checkbox) {
var pos;
var moz;
pos = checkbox.value;
moz = document.getElementById('moz');
moz1 = document.getElementById('moz1');
moz2 = document.getElementById('moz2');
moz3 = document.getElementById('moz3');
switch (pos) {
case "nw" :
if (checkbox.checked === true) { moz.style.visibility="visible" }
else if (checkbox.checked === false) { moz.style.visibility="hidden" }
break;
case "ne" :
if (checkbox.checked === true) { moz1.style.visibility="visible" }
else if (checkbox.checked === false) { moz1.style.visibility="hidden" }
break;
case "se" :
if (checkbox.checked === true) { moz2.style.visibility="visible" }
else if (checkbox.checked === false) { moz2.style.visibility="hidden" }
break;
case "sw" :
if (checkbox.checked === true) { moz3.style.visibility="visible" }
else if (checkbox.checked === false) { moz3.style.visibility="hidden" }
break;
default:
document.write('not possible');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment