jQuery(document).ready(function ($) {
    // When the notice is dismissed
    $(document).on('click', '.pest-control-company-notice .notice-dismiss', function () {
        $.post(ajaxurl, {
            action: 'pest_control_company_dismiss_notice'
        });
    });
});