Try this as a starting point:
var siID;
$(document).ready(function(){
$('#startTimer').click(function(){
var sec = 0;
siID = setInterval(function() {$('#counter span').text(++sec);}, 1000);
})
$('#stopTimer').click(function() {
window.clearInterval(siID);
$('#counter span').text('0');
});
});
http://jsfiddle.net/GNrUM/735/
Your variable siID
is declared inside the click handler, therefor it no longer exists after the function exits and you can't use clearInterval with it.