diff --git a/www/conservancy/static/js/supporter-page.js b/www/conservancy/static/js/supporter-page.js index 9f4e37124f165606986f7f335304284507cad425..fe68045885b0ccb88dc1674372502bc46ff630d1 100644 --- a/www/conservancy/static/js/supporter-page.js +++ b/www/conservancy/static/js/supporter-page.js @@ -70,14 +70,11 @@ $(document).ready(function() { var $selectedLink = $(event.target); $(".supporter-type-selector a").removeClass("supporter-type-selector-selected"); $selectedLink.addClass("supporter-type-selector-selected"); - $(".supporter-type-selection").each(function(index, element) { - var $element = $(element); - if (event.target.href.endsWith("#" + element.id)) { - $element.show(); - } else { - $element.hide(); - } - }); + $(".supporter-type-selection").hide(); + var hashIndex = event.target.href.lastIndexOf('#'); + if (hashIndex > -1) { + $(event.target.href.slice(hashIndex)).show(); + } $formCorrectionNeeded.addClass('hidden'); return false; }; @@ -88,7 +85,7 @@ $(document).ready(function() { }; $window.bind("hashchange", selectSupportTypeFromHash); var $selectorLink = selectSupportTypeFromHash(); - if (parseFloat($("form#annual").get(0).dataset.upgradeFromAmount) > 0) { + if (parseFloat($("#annual form").data('upgradeFromAmount')) > 0) { supportTypeSelector("#annual").click(); $(".supporter-type-selector").hide(); } diff --git a/www/conservancy/templates/supporter/index.html b/www/conservancy/templates/supporter/index.html index b025799e744c2b7c17cd6a6d8e4b32453c43a4e5..15e8cebb7139891a25242b0f1c7c8a9ab5a600c7 100644 --- a/www/conservancy/templates/supporter/index.html +++ b/www/conservancy/templates/supporter/index.html @@ -58,11 +58,10 @@ Become a Supporter Now: Annual | Monthly | Annual Renew

Join as an Annual Supporter

-

Note: annual supporter is not an automatic renewal relationship. If you join today, you'll receive an email in about one year to remind you to optionally renew.

-
@@ -107,7 +106,7 @@ No


-
+

Join as an Monthly Supporter

-

Monthly renewal is automatic. Also, monthly supporters might not receive tangible Supporter benefits (such as the t-shirt) until they've reached at least $60 in monthly supporter donations. However, they will be included immediately in the Supporters' list.

- +
@@ -173,7 +171,7 @@ Yes No

-
+

Renew as an Annual Supporter

-

Note: This option is for existing annual supporters who seek to renew for another year. The annual renewal is not automatic; annual supporters are emailed each year to invite them to optionally renew.

- +
@@ -235,7 +232,7 @@ No


-
+