From 059f67fd0c2b7bdb25b8e4c7d376d9b303613892 Mon Sep 17 00:00:00 2001 From: abuyoyo Date: Thu, 7 Nov 2024 20:55:22 +0200 Subject: [PATCH] jQuery 3.x compatibility --- js/send-wp-mail.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/send-wp-mail.js b/js/send-wp-mail.js index c174191..da3ad88 100644 --- a/js/send-wp-mail.js +++ b/js/send-wp-mail.js @@ -1,5 +1,5 @@ -jQuery( document ).ready( function( $ ) { - $("#swpm-user-list").change( function() { +jQuery( function( $ ) { + $("#swpm-user-list").on( 'change', function() { $recipients = $("#swpm-recipient-emails"); if ( $recipients.val() == '' ) { $recipients.val( $(this).find("option:selected").attr("value") );