Last active
January 22, 2016 20:39
-
-
Save salsalabs/395e7fcd486938a734b2 to your computer and use it in GitHub Desktop.
Replace the ooptional groups header with one that has different text and can be decorated with CSS. This script works on petitions and signup pages. If you'd like to have it work with other pages then send us mail on support@salsalabs.com and we'll see what we can do.
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
<!-- Change the optional groups header on a page. This works on petitions and | |
signup pages. See https://salsasupport.zendesk.com/entries/98541948 --> | |
<style "text/css"> | |
/* Rules to decorate the other-group-header that's inserted by the script (below). */ | |
.other-group-header { | |
margin-top: 20px; | |
font-size: 15pt; | |
} | |
</style> | |
<script type="text/javascript"> | |
// Customize the other group head in this petition by changing the text and | |
// making it so that the CSS (above) can be used to change its appearance. | |
document.addEventListener("DOMContentLoaded", function() { | |
var originalText = 'Add me to the following list(s):'; | |
var replacementText = '<div class="other-group-header">Send me information about snacks!</div>'; | |
var groups = document.getElementById('groups'); | |
if (groups == null) { | |
return; | |
} | |
groups.innerHTML = groups.innerHTML.replace(originalText, replacementText); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment