jquery settimeout function
<p>I try to learn the magic behind ajax-php configuration so that i tried to implement a code like a clock via php. But, it seems i am still missing something. Here is what i did so far.</p>

<p>HTML(starting the clock when it is clicked)</p>

<pre><code>&lt;div id="bu" onclick="clock()"&gt;asccasascascsc&lt;/div&gt;
</code></pre>

<p>JS</p>

<pre><code>&lt;script type="text/javascript"&gt;
 var a = 0;
 function clock() {



     $.ajax({
        type: "GET",
        url: "asd.php",
        data: {  
                'p':a
              },
        dataType: "json",
        cache: false,
        success: function(data) {

            $('#bu').html(data.p);
           setTimeout (clock    (),10000 );
        },
    });

}

 &lt;/script&gt;
</code></pre>

<p>In here i wanted to replace "bu" with an integer 1 and create a loop to increase that number every 1 second. I know that setTimeout function works only once(I am a liar from where i read it:)) But i am calling it every single time.</p>

<p>PHP(asd.php)</p>

<pre><code>&lt;?php
$asd = $_GET['p'];
$asd++;
$data = array();

$data['p'] = $asd;


echo json_encode($data);
?&gt;
</code></pre>

<p>PHP is where i did te increment part.</p>

<p>So, why is it not working? I am only seeing 1 but no more.
Note: I am pretty new as you can see:)</p>
