Skip to content

Instantly share code, notes, and snippets.

@cfjedimaster
Created April 10, 2014 19:49
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 cfjedimaster/10416534 to your computer and use it in GitHub Desktop.
Save cfjedimaster/10416534 to your computer and use it in GitHub Desktop.
//first, put all the divs up ehre
var $theDiv = $("#somediv");
//ie, the second, third, etc
$("input[name=TypeofRequest]").on("change", function(e) {
console.log('changed');
var valPicked = $(this).val();
//hide on D
if(valPicked == "GraphicMaterials") {
$theDiv.show();
$theDiv2.hide();
//also hide 3, 4, etc
} else if(valPicked == "THE OTHER STUFF") {
//so here, show the 2nd div, hide the rest
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment