Skip to content

Commit

Permalink
Set checked property instead of attribute in mandate selection.
Browse files Browse the repository at this point in the history
  • Loading branch information
rvdsteege committed Jan 5, 2023
1 parent 11bf73b commit cad9298
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions views/subscription-mandate.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,18 +276,18 @@
centerMode: true,
} );

$slider.find( '.slick-current input[type="radio"]' ).attr( 'checked', 'checked' );
$slider.find( '.slick-current input[type="radio"]' ).prop( 'checked', true );

$slider.find( '.slick-slide' ).on( 'click', function () {
var index = jQuery( this ).data( 'slick-index' );

$slider.slick( 'slickGoTo', index );
} );

$slider.on( 'afterChange', function ( event, slick, currentSlide, nextSlide ) {
$slider.find( 'input[type="radio"]' ).removeAttr( 'checked' );
$slider.on( 'afterChange', function ( event, slick, currentSlide ) {
$slider.find( 'input[type="radio"]' ).prop( 'checked', false );

$slider.find( '.slick-slide' ).eq( currentSlide ).find( 'input[type="radio"]' ).attr( 'checked', 'checked' );
$slider.find( '.slick-slide' ).eq( currentSlide ).find( 'input[type="radio"]' ).prop( 'checked', true );
} );
} );
</script>
Expand Down

0 comments on commit cad9298

Please sign in to comment.