Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
16 lines (16 sloc)
607 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function() { | |
| var calculator_select = $('select#calc_type') | |
| var original_calc_type = calculator_select.attr('value'); | |
| $('.calculator-settings-warning').hide(); | |
| calculator_select.change(function() { | |
| if (calculator_select.attr('value') == original_calc_type) { | |
| $('div.calculator-settings').show(); | |
| $('.calculator-settings-warning').hide(); | |
| $('.calculator-settings input').prop("disabled", false); | |
| } else { | |
| $('div.calculator-settings').hide(); | |
| $('.calculator-settings-warning').show(); | |
| $('.calculator-settings input').prop("disabled", true); | |
| } | |
| }); | |
| }) |