Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelminter/961845 to your computer and use it in GitHub Desktop.
Save michaelminter/961845 to your computer and use it in GitHub Desktop.
JQuery : Show or hide other page elements based on form selection
$(function(){
checkCollege();
$("#prospect_grad_before_2010").change(function(){
checkCollege();
});
});
function checkCollege(){
($("#prospect_grad_before_2010").val() == "yes") ? $(".field_row_college_after_hs:first").show() : $(".field_row_college_after_hs:first").hide();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment