Refresh Twitter API every 15 seconds

Refresh Twitter API every 15 seconds

I was successful in installing the TWITTER API script, but I can't figure out how to make the script refresh with the latest tweets without refreshing the entire page.  Can I also include a fade in and fade oiut?

Anyone done this?

Many thanks.

Erik

Here is my script:


  1. <script src="/src/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>
  2. <script src="/src/jquery/jquery.jtwitter.min.js" type="text/javascript"></script>

  3. <script type="text/javascript">
  4. $(document).ready(function(){
  5.     // Get latest 6 tweets by jQueryHowto
  6.     $.jTwitter('eriksnet', 3, function(data){
  7.         $('#posts').empty();
  8.         $.each(data, function(i, post){
  9.             $('#posts').append(
  10.                 '<div class="post">'
  11.                 +' <div class="txt">'
  12.                 // See output-demo.js file for details
  13.                 +    post.text
  14.                 +' </div>'
  15.                 +'</div>'
  16.             );
  17.         });
  18.     });
  19. });
  20. </script>



  21. <div id="posts">Getting Erik's tweets...</div>

Erik