Sorry for the late reply, was inactive for a while. Basically, the idea is to maintain the toggle on/off state with a hidden checkbox's built-in checked state, and use sibling selectors to style the UI.
Something in the lines of:
.chkbox + blah {
// styles for off UI
}
.chkbox:checked + blah {
// styles for on UI
}
Sorry for the late reply, was inactive for a while. Basically, the idea is to maintain the toggle on/off state with a hidden checkbox's built-in checked state, and use sibling selectors to style the UI.
Something in the lines of:
.chkbox + blah {
// styles for off UI
}
.chkbox:checked + blah {
// styles for on UI
}
Oh, that's a cool trick! Cheers!