jQuery - Animate & Time interval
<pre><code>&lt;script&gt;
 $(document).ready(function() {

 $.get("database.php", function(data){
  var xp = data + "%";
  $('#exp_bg').animate({
   width: xp
  }, 1500, function() { });
 });

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

<p>Database.php:</p>

<pre><code>&lt;?php
 $xp = 50;
 $level = 100;

 $xp_percent = $xp * 100 / $level;
 echo $xp_percent;
?&gt;
</code></pre>

<p>What i'm trying to do, is that if $xp_percent increases in database.php, then #exp_bg's width will animate into desired width without refresh.</p>

<p>I tried to do that with time interval, which takes data from database.php every speciefed interval of time, but i failed doing that. </p>

<p>Could anyone help me with that?</p>
