openwebrx-clone/htdocs/lib/settings/GainInput.js

22 lines
586 B
JavaScript
Raw Normal View History

2021-02-19 20:07:13 +00:00
$.fn.gainInput = function() {
this.each(function() {
var $container = $(this);
var update = function(value){
$container.find('.option').hide();
$container.find('.option.' + value).show();
}
var $select = $container.find('select');
$select.on('change', function(e) {
var value = $(e.target).val()
update(value);
if (value == 'auto') {
$input.val('auto');
} else {
$input
}
});
update($select.val());
});
}