Last active
August 29, 2015 14:26
-
-
Save FirstVertex/270700ba49f74f0c6091 to your computer and use it in GitHub Desktop.
Select2 with Primary selected item 1/4
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
<label for="Troops">Troops</label> | |
<select name="Troops" id="Troops" multiple="" class="primary-selectable"> | |
<option value="1">Barbarian</option> | |
<option value="2">Archer</option> | |
<option value="3">Goblin</option> | |
<option value="4">Giant</option> | |
<option value="5" selected="selected">Wall Breaker</option> | |
<option value="6">Balloon</option> | |
<option value="7" selected="selected">Wizard</option> | |
<option value="8">Healer</option> | |
<option value="9">Dragon</option> | |
<option value="10" selected="selected">P.E.K.K.A.</option> | |
<option value="11">Minion</option> | |
<option value="12">Hogrider</option> | |
<option value="13">Valkyrie</option> | |
<option value="14" selected="selected">Golem</option> | |
<option value="15" selected="selected">Witch</option> | |
<option value="16">Lava Hound</option> | |
<option value="17" selected="selected">Barbarian King</option> | |
<option value="18" selected="selected">Archer Queen</option> | |
</select> | |
<label>Primary Troop</label> | |
<input type="hidden" id="TroopsPrimary" name="TroopsPrimary" value="17"> | |
<span id="TroopsPrimaryDisplay"></span> | |
<span id="TroopsPrimaryDisplayNone">No Primary Troop selected</span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see here for all code