Skip to content

Instantly share code, notes, and snippets.

@MelSumner
Created September 2, 2014 20:08
Show Gist options
  • Save MelSumner/96d35ae8a205c37c545c to your computer and use it in GitHub Desktop.
Save MelSumner/96d35ae8a205c37c545c to your computer and use it in GitHub Desktop.
A Pen by Melanie Sumner.
A little jQuery: Hiding attributes for BBIS forms
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(EndRequest);
function EndRequest(sender, args) {
AttributeCustomizations();
}
$(document).ready(function () {
AttributeCustomizations();
});
function AttributeCustomizations() {
$('table[id*="dgRegistrationsList"]').children().not(':first').each(function () {
var dietPref = $("label:contains('Dietary Restrictions')", this).parent().parent();
if ($('td[class="EventItemRegistrantsHeader"]:contains("Individual Golfer")')) {
dietPref.addClass('hide');
} else if ($('td[class="EventItemRegistrantsHeader"]:contains("Sponsor")')) {
dietPref.addClass('hide');
} else {}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment