This function uses jQuery to modify the contents of a DOM element. What am I doing wrong?
function updateScore() {
alert("Test score is: " + bucket.score);
$("#testScore").innerHTML = 'Current score is: + bucket.score';
}
The alert runs, but nothing else does. I have a <p>
with the id testScore
, but it doesn't change when I run the function. Why?
Thanks, Elliot Bonneville