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()
{
    console.info('# LAST ID');
    console.log(glb.lastTweetId);
  
    console.info('# TEST 1');
    glb.lastTweetId++;
    console.log(glb.lastTweetId);  
  
    console.info('# TEST 2');
    glb.lastTweetId = glb.lastTweetId+1;
    console.log(glb.lastTweetId);  
    console.info('# TEST 3, OK IS INT BUT PARSE AGAIN ');
    glb.lastTweetId = parseInt(glb.lastTweetId);
    glb.lastTweetId++;
    console.log(glb.lastTweetId);  
    
    $.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'];
        }
        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