I've initialized the switchery using the below code.
var ss_is_schedule_edit = document.querySelector('.ss_is_schedule_edit');
var mySwitch = new Switchery(ss_is_schedule_edit, { color: '#8360c3' });
And I couldn't able to check/uncheck the switchery using the below code. it didn't worked.
$('.switchery').trigger('click');
Also, I've tried the below code but couldn't help.
mySwitch.setPosition(true);
Can anyone help me with this?
I solved my problem with switchery.
Here is the solutions:
You can simply remove the existing switchery section using the below code.
Then, you can initialize the switchery again using the below code.
Thanks.