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

11 lines
359 B
JavaScript
Raw Permalink Normal View History

$.fn.waterfallDropdown = function(){
this.each(function(){
var $select = $(this);
var setVisibility = function() {
var show = $select.val() === 'CUSTOM';
$('#waterfall_colors').parents('.form-group')[show ? 'show' : 'hide']();
}
$select.on('change', setVisibility);
setVisibility();
})
}