title: Background color change onclick refactoring
body: <p>I'm fairly new to JQuery/JavaScript.</p>
  
  <p>I have successfully got the toggle to work on the am/pm buttons you may view it here: 
  <a href="http://codepen.io/Lgalan90/pen/wKdVwq" rel="nofollow">Working Code</a></p>
  
  <p>I am now trying to refactor my code using "this". I haven't figured out whats wrong with using if statements to change the background. Please view here: 
  <a href="http://codepen.io/Lgalan90/pen/yYprXV" rel="nofollow">Code I'm refactoring</a></p>
  
  <pre><code>$('.ampm').click(function() {
  console.log($(this).attr('id'));
  
  var text = $(this).text();
  $('#meridiem').val(text);
  
  if ($(this).attr('id') === $('#am')) {
  $('#wrapper').css('background-color', 'orange');
  } else if ($(this).attr('id') === $('#pm')) {
  $('#wrapper').css('background-color', 'blue');
  }
  });
  </code></pre>
  
  <p>Let me know if you have any questions!</p>