Created
September 15, 2017 17:36
-
-
Save jglenes/c87aeb7403e5988266d34620cf1dee21 to your computer and use it in GitHub Desktop.
Join Form Tweaks
This file contains hidden or 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
/* Include Band #'s with Donation Labels' */ | |
(function($){ | |
var iframe = document.getElementById("can_embed_iframe"); // Get the iFrame with the Form | |
var innerDoc = iframe.contentDocument || iframe.contentWindow.document; // Address iFrame as contentDocument | |
var labels = innerDoc.getElementsByClassName("donate_amount"); // Array of <label> HTML objects | |
for (i = 0, band = 1; i < labels.length; i++, band++) { // i = label array, band = band # | |
labels[i].innerText = "Band " + band + ": \n" + labels[i].innerText; | |
} | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment