Background
I have a few switches from CoreUI in my app that toggle on and off. I need to be able to read the current state of these switches, "on" or "off". I also need to be able to set the state of them based on some other factors.
Question
I have not been able to find an example of this anywhere. How can I access the switch to obtain the current state and set the state to either on or off?
Code Example
<label class="switch switch-text switch-pill switch-success switch-sm pull-right">
<input type="checkbox" class="switch-input" checked>
<span class="switch-label" data-on="On" data-off="Off"></span>
<span class="switch-handle"></span>
</label>