Skip to content

Instantly share code, notes, and snippets.

@salsalabs
Last active February 4, 2020 15:40
Show Gist options
  • Save salsalabs/e5e7b75d5092a6a1d339e5850f669b28 to your computer and use it in GitHub Desktop.
Save salsalabs/e5e7b75d5092a6a1d339e5850f669b28 to your computer and use it in GitHub Desktop.
Provide a way to hide or show the Location information on a Salsa Classic petition that displays signatures.
<!-- BEGIN Script to remove the city and state from petitions.
To remove cities and states from the petition, add the following HTML to the petition header.
<div style="display: none;" id="remove-petition-cities-and-states"></div>
To restore cities and states to a petition, remove the HTML.
-->
<script type="text/javascript">
(function($) {
$(function() {
var e = $('#remove-petition-cities-and-states');
if (e.length == 0) {
return
}
$('table.adminlist th:nth-child(4), table.adminlist td:nth-child(4)').each(function() { $(this).remove() })
})
})($);
</script>
<!-- END Script to remove the city and state from petitions. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment