SM2Gen/Targets/Nutups/nutups.js

20 lines
893 B
JavaScript
Raw Normal View History

//
//Generated by: SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-01-20 16:09:58
//
$(document).ready(function() {
function toggleUPSClasses() {
var selectedOption = $('#Nutmode_select').val();
$('.masterups').toggle(selectedOption === 'netclient'); // Show/Hide masterups based on Net Client
$('.slaveups').toggle(selectedOption === 'netserver'); // Show/Hide slaveups based on Net Server
// Enable/Disable inputs based on the selected option
$('.masterups input').prop('disabled', selectedOption !== 'netclient');
$('.slaveups input').prop('disabled', selectedOption !== 'netserver');
}
// Event listener for the select change
$('#Nutmode_select').change(toggleUPSClasses);
// Set the initial state
toggleUPSClasses();
});