Material Design Switch


I realize this is really old at this point, but I am working in a really old legacy UI that we are trying to transition to Material design with as minimal impact as possible without a full re-write...

Your snippet works amazing for our need, however, as soon as we move the switches outside of the UL/LI pattern, they break... (no click response) if we toggle values programatically it works as expected... If we copy your template into ours they work fine though... I am at a loss as to what would be missing since there is no JS processing or anything that appears to be needed for this?

Any help would be greatly appreciated, thank you again for the amazingly simple MD switches :)

ktiedt () - 10 months ago - Reply 0

And now I feel like an idiot, when I modified the HTML for our templating system I included the name attribute but not the id attributes (which the for attribute is keyed to)... Sorry for the noise!

ktiedt () - 10 months ago - Reply 0