Reputation: 116
I am trying to set a flag when a blockquote has been clicked. It does not appear to be working. Is isClicked considered Global, and if it is, is that not the correct way to change it from within a function?
$(document).ready(function() {
$("blockquote").on("click", function() {
setIsClicked();
});
});
var isClicked = false;
function setIsClicked() {
isclicked = true;
}
Upvotes: 0
Views: 3081
Reputation: 35
It looks like your function is trying to change a different variable - "isclicked" vs "isClicked".
Upvotes: 1