user profile image

Toggle switch with css animation.


  1. I like where you went with the animation.

  2. Thanks @indyplanets, it's actually a fork. Can't take credit for it. The original was using angular (needlessly). I refactored it to use only jquery and css.

  3. I see you're using jQuery (needlessly). I could do JavaScript version, but I'll skip that and go straight to just CSS and HTML: http://codepen.io/Merri/pen/ktyJf - it would make sense to rebuild the HTML to have semantic value, I have a dislike for solutions that use only spans or divs.

  4. @merri I agree and appreciate good semantics. However, the project I prototyped this toggle for already has jQuery as a dependency. I'm also using the toggle to trigger dom manipulations on the page, so binding to the click event makes sense in this use case. If I were using it as a standard checkbox, your implementation would be superior :)

  5. this is delicious. great job.

  6. Very nice

Leave a Comment Markdown supported. Click @usernames to add to comment.

You must be logged in to comment.