Prevent selected payment method description box from sliding up
Closes #21770
This commit is contained in:
parent
507f67cb38
commit
ec1d44c742
|
@ -77,10 +77,12 @@ jQuery( function( $ ) {
|
|||
$payment_methods.eq(0).prop( 'checked', true );
|
||||
}
|
||||
|
||||
if ( $payment_methods.length > 1 ) {
|
||||
// Get name of new selected method.
|
||||
var checkedPaymentMethod = $payment_methods.filter( ':checked' ).eq(0).prop( 'id' );
|
||||
|
||||
if ( $payment_methods.length > 1 ) {
|
||||
// Hide open descriptions.
|
||||
$( 'div.payment_box' ).filter( ':visible' ).slideUp( 0 );
|
||||
$( 'div.payment_box:not(".' + checkedPaymentMethod + '")' ).filter( ':visible' ).slideUp( 0 );
|
||||
}
|
||||
|
||||
// Trigger click event for selected method
|
||||
|
|
Loading…
Reference in New Issue