Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
  <script type="text/javascript">
  
    glb = {};
    glb.lastTweetId = 0;
    
    getTweets();
  
function getTweets()
{
    
    $.getJSON('http://search.twitter.com/search.json?q=%23wwm&since_id='+glb.lastTweetId+'&include_entities=true&result_type=mixed&lang=de&callback=?', function(data, textStatus)
    {
        if(data.results.length > 0)
        {
            glb.lastTweetId = ''+data.results[0]['id']+'';
            var lastTwoDig = parseInt(glb.lastTweetId.substr(glb.lastTweetId.length-2));
            var startDigit = glb.lastTweetId.substring(0, glb.lastTweetId.length-2);
            lastTwoDig++;
            if(lastTwoDig==01){ lastTwoDig = '01'; }
            console.log(glb.lastTweetId);
            console.log(' '+startDigit+''+lastTwoDig+' ');          
        }
        glb.tm= setTimeout('getTweets();',5000);
    });
}
   
  
  </script>
</head>
<body>
  
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers