Last active
August 17, 2017 03:24
-
-
Save samirbehara-zz/e6cba2da193d6c90169edba6cd57bc93 to your computer and use it in GitHub Desktop.
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
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.4.2/knockout-min.js"></script> | |
<select id="switch" data-bind="value: selectedOption"> | |
<option value="option">Select Option...</option> | |
<option value="invNumber">Invoice Number </option> | |
<option value="subCode">Subscriber Code </option> | |
</select> | |
<br><br> | |
<span id="invNumber-input" data-bind="visible: selectedOption() == 'invNumber'"> | |
<input type="text" id="invNumber" placeholder = "Invoice Number"> | |
</span> | |
<span id="subCode-dropdown" data-bind="visible: selectedOption() == 'subCode'"> | |
<select id="subCode"> | |
<option>Select SubCode</option> | |
<option>AA</option> | |
<option>BB</option> | |
<option>CC</option> | |
</select> | |
</span> | |
======================================================================================= | |
ko.applyBindings({ | |
selectedOption: ko.observable() | |
}); | |
======================================================================================= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment