-
-
Save iotashan/4128173 to your computer and use it in GitHub Desktop.
Switch loop
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
followMeSwtichCheckbox.eventOverride = false; | |
followMeSwtichCheckbox.addEventListener('change', function(e) { | |
if (!followMeSwtichCheckbox.eventOverride) { | |
if (checkSOSactive() === false) { | |
alert('SOS inactive.'); | |
} else { | |
followMeSwtichCheckbox.eventOverride = true; | |
followMeSwtichCheckbox.value = !followMeSwtichCheckbox.value; | |
} | |
} else { | |
followMeSwtichCheckbox.eventOverride = false; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment