A Pen by Melanie Sumner on CodePen.
Created
September 2, 2014 20:08
-
-
Save MelSumner/96d35ae8a205c37c545c to your computer and use it in GitHub Desktop.
A Pen by Melanie Sumner.
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
A little jQuery: Hiding attributes for BBIS forms |
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
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