Comparing html element with a file loaded with .get
<p>I have a div that I want to repeatedly update the content of from a file on a server, using <code>setInterval</code>. I only wanted to actually update the content if it's changed, so I tried the following:</p>

<pre><code>$.get('online.txt', function(result){
  if ($('#update').html() != result) {
    $('#update').html(result);
    updatecount++;
    $('#logcount').html(updatecount);
  }
});
</code></pre>

<p>However, the ticker continually updates, indicating that my comparison operation is failing. I'm sure I'm doing something stupid, but it's not obvious to me. Thanks!</p>
