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

Seems that toggle by label doesn't follow jquery selector info? #7

Closed brendanheyu closed 11 years ago

brendanheyu commented 11 years ago

Hi!

Thanks for the update, that's nearly exactly what I'm talking about!

However, I use a class as the selector to identify a togglebutton, not by an individual ID. I've setup a gist so you can see the page I'm building.

https://gist.github.com/3703338

When a field is locked - the label for that checkbox seems to still allow a label click to toggle the button, when it probably shouldn't.

When using a class as selector, I'm finding that all labels seem to toggle the last button touched.

I hope this makes sense!

nostalgiaz commented 11 years ago

Can you please create a http://jsfiddle.net/ to reproduce your issue?

Thanks :)

brendanheyu commented 11 years ago

Oh man - I'm wrestling with fiddle (it's my first time!) but I just can't seem to get it to happen...

http://jsfiddle.net/brendanheyu/j5QDF/2/embedded/result/

nostalgiaz commented 11 years ago

Something like this? :D http://jsfiddle.net/j5QDF/3/

brendanheyu commented 11 years ago

yup - that's it :) looking at it now - thanks a metric tonne!

brendanheyu commented 11 years ago

You can see how the labels aren't quite selecting correctly there in your copy...

nostalgiaz commented 11 years ago

Hi, you can find what you asked me here: 8d2b4779d31e8130be322298e642293c7f4ab3ca

Thanks :)