jQuery(document).ready(function ($) {
    // When the notice is dismissed
    $(document).on('click', '.expert-sports-coach-notice .notice-dismiss', function () {
        $.post(ajaxurl, {
            action: 'expert_sports_coach_dismiss_notice'
        });
    });
});