  toggleBtn.toggleClass("oh-table__toggle-button--show");
    }
  });
  $(document).ready(function () {
    $(".deletebutton").click(function () {
      var id = $(this).attr("data-id");
      var url = `/attendance/attendance-delete/${id}/`;

      // Create a form element
      var form = $("<form></form>");
      form.attr("method", "POST");
      form.attr("action", url);

      // Create a hidden input field for the CSRF token
      var csrf_token = $('input[name="csrfmiddlewaretoken"]').val();
      v