mdbootstrap / bootstrap-toggle-buttons

Bootstrap-toggle-buttons has moved to https://github.com/nostalgiaz/bootstrap-switch
https://github.com/nostalgiaz/bootstrap-switch
Apache License 2.0
1.02k stars 92 forks source link

There is no programmatic way of setting the state #21

Closed volpino closed 11 years ago

volpino commented 11 years ago

It would be nice to expose a method to change the button state

e.g.: $("#checkbox").toggleButtons("set", true)

mattia-beta commented 11 years ago

This may be very useful

Sent from my iPhone

On 01/ott/2012, at 10:30, Federico Scrinzi notifications@github.com wrote:

It would be nice to expose a method to change the button state

e.g.: $("#checkbox").toggleButtons("set", true)

— Reply to this email directly or view it on GitHubhttps://github.com/nostalgiaz/bootstrap-toggle-buttons/issues/21.

abelaska commented 11 years ago

+1

koblas commented 11 years ago

+1 and

It would be nice to have it in the initialization states: { ... enabled: true // or false }

icholy commented 11 years ago

:+1: need this too.

NilsHaldenwang commented 11 years ago

+1

ryan-endacott commented 11 years ago

I did it! I sent a pull request to add my changes. I'm sorry if I've gone about this the wrong way; it's my first time contributing to open source.

nostalgiaz commented 11 years ago

Done :)

This is an example of the code: $('#toggle-state-toggle-button').toggleButtons('setState', false); // true || false