$(document).ready(function() {
  $(document).on("ajax:success", "a[data-remote]", function(e, data, status, xhr) {
    $("#invitations").html(xhr.responseText);

    $('select').chosen(function(){
      allow_single_deselect: true
      no_results_text: 'No results matched'
    });
    $(document).foundation();
  });
  $(document).on('change','#workshop_invitations ',function() {
    this.form.submit();
  })
});

$(document).ready(function() {
  $(document).on("ajax:success", "a[data-remote]", function(e, data, status, xhr) {
    var $invitations = $("#invitations");

    $invitations.html(xhr.responseText);

    $invitations.find('select').chosen(function () {
      allow_single_deselect: true
      no_results_text: 'No results matched'
    });

    $invitations.foundation('tooltip', 'reflow');
  });
  
  $(document).on('change','#workshop_invitations ',function() {
    this.form.submit();
  })
});

Improve HTML re-rendering after marked as attended
Improve HTML re-rendering after marked as attended

This change will slightly improve the time we have to wait when
checking someone in for a workshop. In order to get faster times,
the whole technique has to be replaced by something different.
At the moment, there are a lot of JS events and layout reflows
which slow down the page considerably.
