title: jQuery & Wordpress - change button text with jquery
body: <p>i have a button at the bottom of my page, and when the user scrolls to the bottom of the page a class gets added called 'done'. (this is all handled through a plugin).</p>
  
  <p>i'm trying to change the text of this button when this class gets added. i have worked this script up but have no idea why it's not working?</p>
  
  <p>jquery</p>
  
  <pre><code>jQuery(document).ready(function(){
      if ( $('#load-more').hasClass('done') ) {
          $(this).text('No more posts to load');
      };
  });
  </code></pre>
  
  <p>html</p>
  
  <pre><code>&lt;button id="load-more" class="alm-load-more-btn more done"&gt;Load more posts...&lt;/button&gt;
  </code></pre>