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