Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
function startRefresh() {
    // This is the API URL
    var turl = 'https://btc-e.com/api/2/ltc_btc/ticker';
    // This sends the API URL through Yahoo?
    $.getJSON('https://btc-e.com/api/2/ltc_btc/ticker' + encodeURIComponent(turl) + '%22&format=json', function (data) {
        // Writes to the page 
        $('#ticker').html(data['query'].results.ticker.last+' BTC');
    });
}
// Do the initial pull
startRefresh();
// Refresh every 10000
setInterval(startRefresh, 10000);
Output 300px

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers