How to run the timer when mobile is locked?
<p>I need help for java script . I am using  this code to try the run time execution of program
if(seconds == sec){alert(sec);}
function countdown(element) {enter code here
enter code here</p>

<pre><code>interval = setInterval(function() {
    var el = document.getElementById(element);      
    if(seconds == 0) {
        //alert(seconds);
        if(minutes == 0) {
            el.innerHTML = "00 : 00"; 
            alert("Sorry, you have exceeded our booking time and your order has been cancelled. We are afraid you have to start over!",null,'');
            clearInterval(interval);
            ajax_load_image();
            window.location.href='movies.html';
            return;
        } else {
            minutes--;
            seconds = 60;
        }
    }
    if(minutes &gt; 0) {           
        var minute_text = minutes+(minutes &gt; 1 ? ' ' : ' ');
    } else {
        var minute_text = '0';
    }
    if(minute_text&lt;0)
    {
        $('#countdown').css('color','red');
    }
    var second_text =seconds &gt; 1 ? '' : '';
    if(minute_text=='')
    {
        el.innerHTML ='0 : '+seconds;
    }
    else
    {
        if(seconds&lt;10)
        {
            seconds='0'+seconds;
        }  
        el.innerHTML = '0'+minute_text + ' : ' + seconds + ' ' + second_text+' Min';
    }
    seconds--;
}, 1000);
</code></pre>

<p>}</p>

<p>when i lock the mobile the timer automaticaly stop what can i do to run the run the timer when i lock the mobile.
Help me</p>
