How can one express a condition within the parentheses if a checkbox is checked in JavaScript. Ex:
if(checkbox is checked) {
execute function...
}
else {
if(checkbox is not checked) { /*otherwise*/
execute alternate function...
}
}
I'm a total beginner with JavaScript. Of all the searching I've done, I've found more simpler examples with numbers and operators and such, but nothing with checkboxes.
Basically, what I'm trying to accomplish is to toggle a an element by checking and unchecking a checkbox.
I'd really appreciate any help anyone can lend.