1. Steven Fourie
  2. Switchr

Commits

Steven Fourie  committed d9631d1

Fix class names, remove logging.

  • Participants
  • Parent commits 5af54d9
  • Branches master

Comments (0)

Files changed (2)

File lib/switchr.js

View file
       barGrid = 0;
       this.$element.on('change', function(e) {
         $(this).prop("checked", !$(this).prop("checked"));
-        if ($(this).is(':checked')) {
-          console.log("Value Checked!");
-        } else {
-          console.log("Value Unchecked!");
-        }
         that.moveSliderTo(barGrid, false);
       });
       this.$bar.on('click', function(e) {
       } else {
         add = 0;
       }
-      console.log("Cur add: " + add);
       return barGrid + add;
     },
     animateBackground: function() {

File src/switchr.coffee

View file
 Switchr = (element, options) ->
     @options = options
     @$element = $(element)
-    @$container = $("<div class='switch-container'></div>")
-    @$bar = $("<div class='switch-bar'></div>")
-    @$slider = $("<div class='switch-slider'></div>")
-    @$text = $("<div class='switch-text'>Off</div>")
+    @$container = $("<div class='switchr-container'></div>")
+    @$bar = $("<div class='switchr-bar'></div>")
+    @$slider = $("<div class='switchr-slider'></div>")
+    @$text = $("<div class='switchr-text'>Off</div>")
     @init()
     return
   
     
     @$element.on('change', (e) ->
       $(@).prop("checked", !$(@).prop("checked"))
-      
-      if ($(@).is(':checked'))
-        console.log("Value Checked!")
-      else
-        console.log("Value Unchecked!")
-        
       that.moveSliderTo(barGrid, false)
       return
     )
       add = @$bar.innerWidth() - @$slider.outerWidth(true)
     else
       add = 0
-      
-    console.log("Cur add: " + add)
+
     return barGrid + add
 
   animateBackground: ->