Skip to content

@pvalencia /gist:167635
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
async but not ajax cross-site
<html>
<head></head>
<body>
<ul id="tweets">
</ul>
<a href="#">reload tweets</a>
<script src="jquery-1.3.2.min.js"></script>
<script>
function updateTwitter(tweets) {
var uls = '';
$(tweets).each(function(i, el) {
uls += '<li>' + el.text + '</li>';
});
$('#tweets').html(uls);
}
$('a').click(function() {
$('body').append($('<script src="http://twitter.com/statuses/user_timeline/pvalencia.json?callback=updateTwitter&count=3" />'));
});
</script>
<script src="http://twitter.com/statuses/user_timeline/pvalencia.json?callback=updateTwitter&count=3"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.