web: Use prop instead of attr for form changes through js.
authorMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Thu, 18 May 2017 01:49:03 +0000 (03:49 +0200)
committerMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Thu, 18 May 2017 01:49:03 +0000 (03:49 +0200)
web/share/campaign/campaign.js

index 038edfb..2f4bdce 100644 (file)
@@ -59,11 +59,11 @@ $(document).ready(function() {
     let value = vals[idx];
     $(".amount-btn-" + value.toString()).attr("href", "#");
     $(".amount-btn-" + value.toString()).on("click", function() {
-      $("#amountother").attr("value", value.toString());
-      $("#currency option").attr("selected", false);
-      $("#currency option[value='EUR']").attr("selected", true);
-      $("#recur option").attr("selected", false);
-      $("#recur option[value='12']").attr("selected", true);
+      $("#amountother").prop("value", value.toString());
+      $("#currency option").prop("selected", false);
+      $("#currency option[value='EUR']").prop("selected", true);
+      $("#recur option").prop("selected", false);
+      $("#recur option[value='12']").prop("selected", true);
     });
   }
 });