Created
April 15, 2010 16:48
-
-
Save anonymous/367346 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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