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