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