Permainan ini cukup sederhana, Anda mengklik tombol start untuk memulai, lalu gerakkan mouse Anda di sepanjang trek hingga Anda mencapai akhir, lalu pengatur waktu berhenti dan menunjukkan skornya. Jika Anda keluar jalur, Anda mendapat skor nol.
Mengapa fungsi mouseOver saya tidak berfungsi? Tautan ke kode lengkap saya: http://www.codecademy.com/TictacTactic/codebits/AQBK4L/edit
Terima kasih sebelumnya!
var score = 1000;
var timer = setInterval(countDown(), 1000);
$(document).ready(function() {
$('#start').click(function() {
$('#game').mouseover(function() {
stopTimer();
score = 0
$('#points').html(score)
});
$('#end').mouseover(function() {
stopTimer()
$('#points').html(score)
});
});
});
function countDown() {
score = score - 1;
}
function stopTimer() {
clearInterval(timer);
}
mouseOver != mouseover
, di situlah letak masalahnya. - person elclanrs   schedule 29.06.2014