What am I doing wrong? If the button is clicked, variable s will have a value of 10, if not, it's 0. It's not working though.
$('button').observe('click', function () {
var clicked = true;
window.clicked = clicked;
});
if (clicked)
{
var s = 10;
}
else
{
var s = 0;
}