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

17 lines
458 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) {
2021-02-22 22:47:19 +00:00
var value = $(e.target).val();
2021-02-19 20:07:13 +00:00
update(value);
});
update($select.val());
});
}