title: Not sure why my click event won't work?
body: <p>I've set up a click event to change the background color of the entire page to green upon the user button being clicked, but when I click it nothing happens. I'm extremely new to jQuery, so I'm sure I'm making an obvious error. </p>
  
  <pre><code>$(document).ready(function() {
      var $body = $('body')
      /*$body.html('');*/
  
      //  var currentView = "Twittler Feed"
      var currentView = $('&lt;p&gt;Twittler Feed&lt;/p&gt;');
      var refreshTweet = function() {
          var index = streams.home.length - 1;
          var endInd = index - 10;
          while (index &gt;= endInd) {
              var tweet = streams.home[index];
              var $tweet = $('&lt;div class="tweets"&gt;&lt;p class="posted-by"&gt;&lt;button class="user"&gt;@' +
                  tweet.user + '&lt;/button&gt;&lt;p class="message"&gt;' + tweet.message +
                  '&lt;/p&gt;&lt;p class="time"&gt;' + /*$.timeago(tweet.created_at)*/ tweet.created_at + '&lt;/p&gt;&lt;/div&gt;');
              currentView.appendTo('#sidebar')
              $tweet.appendTo($body);
              index -= 1;
          }
      }
  
      refreshTweet();
  
      $('.refresh').on('click', function() {
          if (document.getElementsByClassName('tweets')) {
              $('.tweets').remove();
          }
          var result = refreshTweet();
          $body.prepend(result);
      })
  
      $('.user').on('click', 'button', function() {
          currentView = this.user
          $('body').css('background-color', 'green');
  
      });
  });
  </code></pre>