anchor.diff:        $('.alert').remove();
       }, 2000);
      })
  +
   </script>
   <script>
   $(function() {
  
positive.code:     $('#notification-list').append(partial);
      // re-invoke event listener to delete invitation if user clicks 'decline'
      deleteInvitation();
      removeFlash();
    });
  
    channel.bind('create_chat_room', function(data) {
  
negative.code: 
  <% if flash[:notice]%>
    <% flash[:notice].each do |msg| %>
      <div class="alert alert-success" role="alert">
      <span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span>
      <span class="sr-only">Error:</span>
        <%= msg %>
      </div>
    <% end %>
  <% elsif flash[:alert] %>
    <% flash[:alert].each do |msg| %>
      <div class="alert alert-danger" role="alert">
      <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
      <span class="sr-only">Error:</span>
        <%= msg %>
      </div>
    <% end %>
  <% end %>
  
  