Skip to content

Instantly share code, notes, and snippets.

Last active August 17, 2017 03:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
<script src=""></script>
<select id="switch">
<option value="unknown">Select Option...</option>
<option value="invNumber">Invoice Number </option>
<option value="subCode">Subscriber Code </option>
<span id="invNumber-input" style="display:none"><input type="text" id="name"></span>
<span id="subCode-dropdown" style="display:none">
<select id="subCode">
<option>Select SubCode</option>
$("#switch").change(function () {
switch($("#switch").val()) {
case "invNumber":
$("#invNumber-input").css("display", "inline")
$("#subCode-dropdown").css("display", "none")
case "subCode":
$("#invNumber-input").css("display", "none")
$("#subCode-dropdown").css("display", "inline")
$("#subCode-dropdown").css("display", "none")
$("#invNumber-input").css("display", "none")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment