mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-01 16:51:18 +03:00
Remove existing error messages before adding the latest response
This commit is contained in:
parent
5f705e80f6
commit
e513a20d07
|
@ -99,6 +99,7 @@ jQuery( document ).ready( function( $ ) {
|
|||
closeModal();
|
||||
$( button ).after( $( '<p>' ).html( '<em>' + response.message + '<em>' ) );
|
||||
} else {
|
||||
$( 'div.notice' ).remove();
|
||||
const $message = $( '<div>' )
|
||||
.addClass( 'notice notice-alt' )
|
||||
.addClass( response.success ? 'notice-success' : 'notice-error' )
|
||||
|
|
Loading…
Reference in a new issue