Skip to content

Instantly share code, notes, and snippets.

@mojombo
Forked from cannikin/something.js
Created March 24, 2009 17:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mojombo/84248 to your computer and use it in GitHub Desktop.
Save mojombo/84248 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
MyUpdater = {
since:'<%= @since.to_f %>',
u: function() {
new Ajax.PeriodicalUpdater('notes','/poller', {
asynchronous:false,
frequency:'4',
method:'get',
parameters:"since="+MyUpdater.since,
insertion:'top',
onSuccess:function(r) { MyUpdater.since = r.responseText; }
})
}
};
MyUpdater.u();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment