Aashishkebab
New Coder
I have this function:
When the left-hand side of the if is equal to 3 (and the right-hand side is always 2,789), this statement executes as true and I get the alerts that I have placed inside the if statement. WTF. And yes, I've ensured max and value are integers. Value gets incremented every second.
JavaScript:
// Increments the scrubber's value based on the speed the user has set and calls seek(). If at max, pauses.
function tickClock(){
if(document.getElementById('TheScrubber').value >= document.getElementById('TheScrubber').max){
clearInterval(clock);
document.getElementById('PlayPauseButton').src = 'play.png';
alert(document.getElementById('TheScrubber').value);
alert(document.getElementById('TheScrubber').max);
}
else{
document.getElementById('TheScrubber').value++;
seek();
}
}
When the left-hand side of the if is equal to 3 (and the right-hand side is always 2,789), this statement executes as true and I get the alerts that I have placed inside the if statement. WTF. And yes, I've ensured max and value are integers. Value gets incremented every second.