Skip to content
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

Added indeterminate state support #197

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ogeid-dev
Copy link

I added indeterminate state support, may be a little ugly right now because I had to rush it but it may help someone.

@ecttor
Copy link

ecttor commented Jul 30, 2018

Hello can you help me with this? I have doubts on how to call the indeterminate state. how should I do this?

@ogeid-dev
Copy link
Author

ogeid-dev commented Jul 30, 2018

Use the data indeterminate data attribute to enable it like so:
<input class="form-control" id="toggle" name="toggle" data-toggle="toggle" data-on="Yes" data-off="No" data-indeterminate="true" type="checkbox">

Then you can set the state like:
$('#toggle').prop('indeterminate', true).change();

And check the state with: $("#toggle").prop("indeterminate")

@ecttor
Copy link

ecttor commented Jul 30, 2018

Ty, your answer helped me a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants