Amount starts class "valid", when default accepted

The default amount of $120 appears in the amount field, but the class
"valid" was usually only added when the user changes the amount.

The valid class must be added at the start to ensure someone simply
clicking with the default still can donate.
This commit is contained in:
Bradley M. Kuhn 2014-12-02 17:58:39 -05:00
parent 9aa9e73a91
commit c546833984

View file

@ -32,6 +32,7 @@ $(document).ready(function() {
$control.find('.toggle-content').slideUp("slow"); $control.find('.toggle-content').slideUp("slow");
$control.find('.toggle-content').slideDown("slow"); $control.find('.toggle-content').slideDown("slow");
}); });
$('#amount').addClass("valid");
$('#amount').on('input', function() { $('#amount').on('input', function() {
var input=$(this); var input=$(this);
var value = input.val(); var value = input.val();