jQuery("body").on("click", '#roofing-specialist-welcome-notice .notice-dismiss', function (event) {
    event.preventDefault();

    jQuery.ajax({
      type: 'POST',
      url: ajaxurl,
      data: {
          action: 'roofing_specialist_dismissed_notice',
          nonce: roofingSpecialistNotice.nonce,
      },
      success: function () {
          // Remove the notice on success
          $('.notice[data-notice="example"]').remove();
      }
    });
  }
)