Skip to content

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