Start toggle on row click

This commit is contained in:
Caleb Burks 2018-02-19 20:03:32 -05:00
parent ab6b978399
commit 8ef278a28b
2 changed files with 3 additions and 2 deletions

View File

@ -639,6 +639,8 @@ body {
// Toggle display a list of services.
.wc-wizard-services-list-toggle {
cursor: pointer;
.wc-wizard-service-enable::before {
content: "\f343"; // up chevron
font-family: "dashicons";
@ -658,7 +660,6 @@ body {
.wc-wizard-service-enable input {
visibility: hidden;
position: relative;
cursor: pointer;
}
}

View File

@ -48,7 +48,7 @@ jQuery( function( $ ) {
$checkbox.prop( 'checked', ! $checkbox.prop( 'checked' ) ).change();
} );
$( '.wc-wizard-services-list-toggle' ).on( 'change', '.wc-wizard-service-enable input', function() {
$( '.wc-wizard-services-list-toggle' ).on( 'click', function() {
$( this ).closest( '.wc-wizard-services-list-toggle' ).toggleClass( 'closed' );
$( this ).closest( '.wc-wizard-services' ).find( '.wc-wizard-service-item' )
.slideToggle()