openwebrx-clone/htdocs/lib/settings/SchedulerInput.js
2021-02-24 17:12:23 +01:00

17 lines
468 B
JavaScript

$.fn.schedulerInput = 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.mode');
$select.on('change', function(e) {
var value = $(e.target).val();
update(value);
});
update($select.val());
});
}