View difference between Paste ID: v0tk3v2m and WiBFxNMr
SHOW: | | - or go back to the newest paste.
1
(function() {
2
3
  "use strict";
4
5-
  var toggle = document.querySelectorAll(".cmn-toggle-switch");
5+
  toggleHandler(document.querySelectorAll(".cmn-toggle-switch"));
6
7
  function toggleHandler(toggle) {
8
    toggle.addEventListener( "click", function(e) {
9
      e.preventDefault();
10
      (this.classList.contains("active") === true) ? this.classList.remove("active") : this.classList.add("active");
11
    });
12
  }
13
14
})();