bootstrap-switch
bootstrap-switch copied to clipboard
.blur() on switch change only works one way
I'm not sure if this is a bug or something I'm doing wrong, but I've tested many things and the problem remains. I need to remove focus from the bootstrap-switch once it's been clicked. This is what I'm doing in my javascript/jquery:
$('[name="my-checkbox"]').on('switchChange.bootstrapSwitch', function(event, state) { $( this ).blur(); });
Weirdly, it only works when I uncheck (or put the switch to off). The other way, the focus remains on the input element (I verified where the focus was in my console).