javascript slow script
<p>I have a little quiz game made with JavaScript. After the 10th or 11th question the game is very slow. Can anybody tell me why?</p>

<pre><code> $("#timer_default").createTimer({time_in_seconds: 60});

      $("#timer_toggle").click(function() { 
        if ($("#timer_default").data('countdown.state') == 'running') {
          $("#timer_default").pauseTimer();
        } else {
          $("#timer_default").startTimer();
        }
        return false;
      });

    $('#quizz_start').click(function()
    {
        $(this).hide();
        $('#quz_text').hide();
        $("#time").show();
        $("#timer_default").resetTimer();
        start_quizz();
    }); 

    function continue_quizz(step)
    {
            if (step&gt;total_steps) show_results();
            var v =  $('[id^="quiz_'+step+'_"]').attr('id');
            var a = v.split('_');
             corect = a[2];
            $('.quizz_text').hide();
            $('#success').css('display','none');
            $('#error').css('display','none');
            $('[id^="quiz_'+step+'_"]').show();
            $('.response').show();
              $('#adevarat').click(function()
              {
                if (corect=='A') {$('#success').show();$('#error').hide();$('.response').hide();responses[step]=true;responses_gaved[step]='Adevarat';$("#timer_default").pauseTimer();} 
                if (corect=='F') {$('#error').show();$('#success').hide();$('.response').hide();responses[step]=false;responses_gaved[step]='Fals';$("#timer_default").pauseTimer();}
              });
              $('#fals').click(function()
              {
               if (corect=='F') {$('#success').show();$('#error').hide();$('.response').hide();responses[step]=true;responses_gaved[step]='Adevarat';$("#timer_default").pauseTimer();} 
               if (corect=='A') {$('#error').show();$('#success').hide();$('.response').hide();responses[step]=false;responses_gaved[step]='Fals';$("#timer_default").pauseTimer();}    
              });

                $('#success').click(function(){$("#timer_default").startTimer();continue_quizz(++step)});
                $('#error').click(function(){$("#timer_default").startTimer();continue_quizz(++step)});

    }

    function start_quizz()
    {   var step = 1;
        responses = new Array();
        responses_gaved = new Array();
        total_steps = 24;
        continue_quizz(step);
    }  

    function show_results()
    {       
            var len=responses.length;
            var c=0;
            for (var i=1;i&lt;len;i++)
             {
                 if (responses[i]) c++;
             }
            $("#timer_default").pauseTimer();
            $("#time").hide();
            $('.response').hide();
            $('.quizz_text').hide();
            $('#success').css('display','none');
            $('#error').css('display','none');
            $('#quz_text').css('margin-top','50px');
            if (len&gt;0) len2=len-1; else len2=len;
            $('#quz_text').text('Ai raspuns corect la '+c+' din '+(len2)+' intrebari.').append('&lt;br&gt;');
            $('#quz_text').append('Raspunsurile tale :');
            $('#quz_text').append('&lt;br&gt;');
            for (var i=1;i&lt;len;i++)
             {  
                 if (responses[i]) responses[i]='&lt;span class="green"&gt;raspuns corect&lt;/span&gt;'; else responses[i]='&lt;span class="red"&gt;raspuns incorect&lt;/span&gt;'; 
                 var txt = $('[id^="quiz_'+i+'_"]').text();
                 $('#quz_text').append('&lt;span&gt;'+txt+'&amp;rarr;'+responses_gaved[i]+'&amp;rarr;'+responses[i]+'&lt;/span&gt;&lt;br&gt;');
             }    
            $('#quz_text').show();
            $('.rst').show();

           //Auto scroll to bottom
            var myDiv = $(".quizz");
            myDiv.animate({ scrollTop: myDiv.prop("scrollHeight") - myDiv.height() }, 5000);

    }
</code></pre>
