-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing a Switchery checkbox state from code #25
Comments
+1 |
Can't you just call |
The above does the trick for you guys. Thanks for the answer @guillerodriguez! |
Find the element using jquery then remove all siblings. Then you can you just use switchery again. |
@dafinley idea is the best so far... |
After playing around with all these, the best way I found was to just send it a click via Jquery. |
I am agree with damiensawyer, I wrote a little function to setState an element |
Cool. If anyone's interested, I implemented it as a knockout js binding as follows. This allows it to be bound to an observable boolean:
|
Try to change checked property and then invoke setPosition() |
I have two checkboxes and I want the not clicked checkbox to change when I click one of them (essentially a radio group with two radio buttons). Now when I |
For myself, I check if the checkbox is a different state than the one I want and then trigger a click |
I had this problem and I was calling an onclick function so I couldn't trigger any click event or It would start an infinite loop. I managed to solve like this:
|
Not convenient approach for initialization and no why to pass state via setting nor via java-script.
Please provide a way to change state from code
The text was updated successfully, but these errors were encountered: