Toggle #winkey div based on mode selection

Show the #winkey div when data.mode is 'CW' and hide it otherwise. This improves the UI by conditionally displaying the Winkey controls only when relevant.
This commit is contained in:
Peter Goodhall 2025-10-07 22:40:23 +01:00
parent 3215f6847c
commit 60e191ce74

View file

@ -1956,6 +1956,12 @@ $(document).ready(function() {
});
cat2UI($('.mode'), data.mode, false, false, () => {
setRst($(".mode").val());
// If the data.mode is winkey show the div with id winkey if not hide it
if (data.mode === 'CW') {
$('#winkey').show();
} else {
$('#winkey').hide();
}
});
cat2UI($('#sat_name'), data.satname, false, false);
cat2UI($('#sat_mode'), data.satmode, false, false);