Skip to content

Instantly share code, notes, and snippets.

@bjoerge
Created January 4, 2012 13:20
Show Gist options
  • Save bjoerge/1560006 to your computer and use it in GitHub Desktop.
Save bjoerge/1560006 to your computer and use it in GitHub Desktop.
SimplePoll Client example
$.fn.SimplePoll('/api/tiramisu/v1/tick')
.progress(function(line) {
var parts = line.split(";")
$('#bar').css('width', parts[0]+'%');
$('#progress').html(parts[1]);
})
.then(function() {
$('#progress').html("Ferdig nå.");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment