bootstrap4-toggle icon indicating copy to clipboard operation
bootstrap4-toggle copied to clipboard

Would be great to have CSS only instructions

Open simonh1000 opened this issue 5 years ago • 2 comments

I use Elm and letter jquery play around with the dom can lead to problems. I like the styling but could not figure out how much of the javascript was doing essential thigns above and beyond adding/removing styles

simonh1000 avatar Sep 29 '19 05:09 simonh1000

Hi @simonh1000

This library is actually a jQuery plugin, so it's dependent on jQuery all the way up.

There is another version without jQuery that uses modern JavaScript instead that you may consider: bootstrap-switch-button

Lastly, a lighter version that consists entirely of CSS (and Bootstrap components) seems plausible, it would just require users to construct the switch-button themselves (it's a containing div with some buttons) and then manage events using inline onChange calls.

gitbrent avatar Oct 10 '19 02:10 gitbrent

yes it was this last point that I meant - as I use Elm, I'm used to reimplementing stuff in our strange but lovable language, but your CSS is valuable in its own right. However, when I looked at the javascript I could see that there is rather more happening that just adding or removing a couple of classes and handling a couple of events

simonh1000 avatar Oct 10 '19 06:10 simonh1000