From 3e656329f209978bbe8afc6d652d391a1be48154 Mon Sep 17 00:00:00 2001 From: Paolo Luigi Scala Date: Wed, 18 Oct 2023 09:38:24 +0200 Subject: [PATCH] Fix JQuery deprecation warning --- packages/js/src/initializers/admin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/js/src/initializers/admin.js b/packages/js/src/initializers/admin.js index 8aaf8617ae3..a9397b37062 100644 --- a/packages/js/src/initializers/admin.js +++ b/packages/js/src/initializers/admin.js @@ -314,12 +314,12 @@ export default function initAdmin( jQuery ) { } ).trigger( "change" ); // Toggle the Wincher section. - jQuery( "#wincher_integration_active input[type='radio']" ).change( function() { + jQuery( "#wincher_integration_active input[type='radio']" ).on( "change", function() { // The value on is enabled, off is disabled. if ( jQuery( this ).is( ":checked" ) ) { jQuery( "#wincher-connection" ).toggle( jQuery( this ).val() === "on" ); } - } ).change(); + } ).trigger( "change" ); // Handle the settings pages tabs. jQuery( "#wpseo-tabs" ).find( "a" ).on( "click", function( event ) {