Skip to content

Instantly share code, notes, and snippets.

@shaina7837
Last active September 16, 2015 18:12
Show Gist options
  • Save shaina7837/ea4fdf3c0186ec4cb177 to your computer and use it in GitHub Desktop.
Save shaina7837/ea4fdf3c0186ec4cb177 to your computer and use it in GitHub Desktop.
var count = 0;
setInterval(function(){
var previousCount = count;
count = '<%= j @msgs.to_s %>';
if(count > previousCount)
{alert(count); }
},
1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment