Browse Source

Slider now updates when moving

Aubort Jean-Baptiste 5 years ago
parent
commit
c4be89257d
2 changed files with 2 additions and 2 deletions
  1. 1 1
      main.js
  2. 1 1
      trigger.html

+ 1 - 1
main.js

@@ -226,8 +226,8 @@ $(document).ready(function(){
     $('#btn-white').click(function(){ switchTheLightOn() ; });
     $('#btn-off').click(function(){ switchTheLightOff(); });
     $('#btn-police').click(function(){ switchTheLightToPolice(); });
-    $('#breathSlider').change(function(){ changeBreathSpeed(); });
     $('#breathSlider').mouseup(function(){ setTheBreathSpeed(); });
+    $('#breathSlider').on('change mousemove', function(){ changeBreathSpeed(); });
 
     // Open/Close buttons
     $('#btn-minus').click(function(){ changeHour(0); });

+ 1 - 1
trigger.html

@@ -59,7 +59,7 @@
         </div>
         <div id="breathBox">
             <h3 for="breathSlider">Breathing leds</h3>
-            <input type="range" value=0 min=0 max=5000 step=10 id="breathSlider">
+            <input type="range" value="0" min="0" max="5000" step="100" id="breathSlider">
             <span id="breathValue">0 ms</span>
         </div>
     </div>