title: Addclass on document.ready doesn't persist
body: <p>I'm styling something using the following code:</p>
  
  <pre><code>$( document ).ready(function(){
    $("div.event").closest('td').addClass('success');
  </code></pre>
  
  <p>This works great on first loading the page, but when I navigate back to the page or am redirected by a controller (this app is on Rails), the class has left the element.</p>
  
  <p>For some context, this app renders events inside of a calendar styled table.  The intention is to highlight the table td if there is an event inside of it.</p>
  
  <p>Any insights how I can get it to persist would be appreciated.</p>