jQuery counting with timer
<p>Here is the functionality simply when click btnGo timer will stop and get it's value, if time remaining is not exceed its automatically add +1 to On time total My problem is its not adding it only shows the value below are my codes with live demo</p>

<p><strong>My JS</strong></p>

<pre><code>var sec = $('#timerSec').text() || 0;
var timer;

function startTimer() {
    if (timer) clearInterval(timer);
    sec = 10;
    timer = setInterval(function() {
        $('#timerSec').text(sec--);
        if (sec == 0) {
            clearInterval(timer);
        }
    }, 1000);
}
$(function() {
startTimer();

$('#btnGo').click(function(){
    $(this).fadeOut();
    $("#alert").fadeIn();
    clearInterval(timer);
    var secR = $('#timerSec').text();
    var t = $('#alert span').text()
    $('#btnCon').fadeIn();
    if (secR != 0 ){
    var i = t+1;
    }
    $('#alert span').html(i).show();
});
$('#btnCon').click(function(){
   $("#alert").fadeOut();
    $("#btnGo").fadeIn();
    startTimer();
});


});
</code></pre>

<p><strong>My html</strong></p>

<pre><code>&lt;div id="timerSec"&gt;10&lt;/div&gt; seconds

&lt;a href="#" id="btnGo"&gt;Go&lt;/a&gt;
&lt;div id="alert" style="display:none"&gt;
&lt;a href="#" id="btnCon" &gt;Continue&lt;/a&gt;
 On time = &lt;span&gt;0&lt;/span&gt;
&lt;/div&gt;
</code></pre>

<p><a href="http://jsfiddle.net/mTRwR/2/" rel="nofollow">Live Demo</a> jsfiddle</p>
