-
-
Save mrshu/1925622 to your computer and use it in GitHub Desktop.
missing }
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var goal1 = 0; | |
var goal2 = 0; | |
window.scaling1 = 0; | |
window.scaling2 = 0; | |
function toggleOnGoal() { | |
btnStart = document.getElementById("btnStart"); | |
if (btnStart.innerHTML == "Pause") { | |
$("#time").stopwatch().stopwatch('stop'); | |
btnStart.innerHTML = "Resume"; | |
} | |
} | |
function team1Goal() { | |
if (window.scaling1 == 1) { | |
return false; | |
} else { | |
goal1++; | |
//toggleOnGoal(); | |
$("#team1").html(goal1); | |
window.scaling1 = 1; | |
$("#team1").effect("scale", { | |
percent: 150 | |
}, 1000).effect("scale", { | |
percent: Math.ceil(100 / (150 / 100)) | |
}, 1000, function () { | |
window.scaling1 = 0; | |
}); | |
} | |
} | |
function team2Goal() { | |
goal2++; | |
//toggleOnGoal(); | |
$("#team2").html(goal2); | |
$("#team2").effect("scale", { | |
percent: 150 | |
}, 1000).effect("scale", { | |
percent: Math.ceil(100 / (150 / 100)) | |
}, 1000); | |
} | |
function team1Down() { | |
if (goal1 <= 0) { | |
goal1 = 0; | |
return false; | |
} else { | |
goal1--; | |
$("#team1").html(goal1); | |
$("#team1").effect("scale", { | |
percent: 150 | |
}, 1000).effect("scale", { | |
percent: Math.ceil(100 / (150 / 100)) | |
}, 1000); | |
return false; | |
} | |
} | |
function team2Down() { | |
if (goal2 <= 0) { | |
goal2 = 0; | |
return false; | |
} else { | |
goal2--; | |
$("#team2").html(goal2); | |
$("#team2").effect("scale", { | |
percent: 150 | |
}, 1000).effect("scale", { | |
percent: Math.ceil(100 / (150 / 100)) | |
}, 1000); | |
return false; | |
} | |
} | |
function resetScore() { | |
goal1 = 0; | |
goal2 = 0; | |
$('#team1').html(goal1); | |
$('#team2').html(goal2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment