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:
- <script src="/src/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>
- <script src="/src/jquery/jquery.jtwitter.min.js" type="text/javascript"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- // Get latest 6 tweets by jQueryHowto
- $.jTwitter('eriksnet', 3, function(data){
- $('#posts').empty();
- $.each(data, function(i, post){
- $('#posts').append(
- '<div class="post">'
- +' <div class="txt">'
- // See output-demo.js file for details
- + post.text
- +' </div>'
- +'</div>'
- );
- });
- });
- });
- </script>
- <div id="posts">Getting Erik's tweets...</div>
Erik