title: How can I remove notification circle on click?
body: <p>I want to remove my .badge-alert that is being set on click, but I'm having a difficult time figuring out how to do this. I think I know why it's happening, every time the cookieData is &lt;= jsonDate, it sets it again. So even on click it's not removing it. I've tried moving things around to no avail. I've gotten close, on click it will remove everything, but I don't want to remove the .stakebox-container, only the badge-alert. </p>
  
  <pre><code>    if (!Cookies.get('inbox')){
      Cookies.set('inbox', 2018030, { expires: 9000000 });
  };
  var cookieDate = Cookies.get('inbox');
  console.log(cookieDate);
  
  $.each(stakeBox, function(i, stakeBoxData){
      var jsonDate = stakeBoxData.data_change_date;
      var winLoss = stakeBoxData.win;
      var points = stakeBoxData.amount_stakebox;
      var winLoss = stakeBoxData.win;
      var id = stakeBoxData.id;
      var homeTeam = stakeBoxData.home_team;
      var awayTeam = stakeBoxData.away_team
  
      if(cookieDate &lt;= jsonDate){
          // this counts the true and false JSON data;
  
          console.log(jsonDate);
  
          var count = i + 1 ;
  
          $('.badge-alert').text(count);
  
          $('.stakebox-container').append('\
              &lt;div id="'+ id +'" class="stakebox-message-container"&gt;\
                  &lt;div class="stakebox-icon"&gt;&lt;/div&gt;\
                  &lt;div class="stakebox-game"&gt;&lt;h5&gt;' + awayTeam + ' at ' + homeTeam +'&lt;/h5&gt;&lt;/div&gt;\
                  &lt;div class="stakebox-points"&gt;&lt;h5&gt;'+ points +'&lt;/h5&gt;&lt;/div&gt;\
              &lt;/div&gt;\
          ');
          if (winLoss === true){
          $('.stakebox-icon').last().append('&lt;i class="far fa-smile face"&gt;&lt;/i&gt;');
          $('.stakebox-message-container').last().css('background', '#35c3ad');
          } else if (winLoss === false) {
              $('.stakebox-message-container').last().css('background', '#a20000');
              $('.stakebox-icon').last().append('&lt;i class="far fa-frown face"&gt;&lt;/i&gt;');
          };
  
      } else {
      }
  });
  $('#stakebox').click(function(){
      var cookieValue = Cookies.get('inbox');
      Cookies.remove('inbox');
      Cookies.set('inbox', 20180303, { expires: 9000000 });
      $('.badge-alert').remove();
   });
  </code></pre>