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

Relying on the checkbox instead of a wrapper #46

Closed rayfranco closed 11 years ago

rayfranco commented 11 years ago

Should the DOM be plugin-specific ?

Is there a reason why you decide to design it this way (since it's bootstrap specific) ? What about relying on the checkbox instead of a wrapper ?

<input id="checkbox1" type="checkbox" value="value1" checked="checked">

And then

$('#checkbox1').toggleButtons();

In my opinion, the plugin should build itself what it needs to display correctly, our views should stay clean of plugin-specific DOM. What do you think ?

nostalgiaz commented 11 years ago

I will consider it for the next release. Thanks!