You need to call clearInterval() on the reference of setTimeout.
var timer;
$("#startClock").click( function(){
var counter = 60;
if(!timer){
timer = setInterval(function() {
counter--;
if (counter >= 0) {
span = document.getElementById("count");
span.innerHTML = counter;
}
if (counter === 0) {
$("Sorry, you lost!").dialog();
clearInterval(timer);
}
}, 1000);
}
});
Also add a call to clearInterval(timer) when the user wins the game, but first check if timer is defined.