Consider this as your drop down.
<select id="last_used_edit">
<option value="" disabled selected>Year</option>
<option value="1" selected="{{option3Selected 'Option 1'}}" >Option 1</option>
<option value="2" selected="{{option3Selected 'Option 2'}}" >Option 2</option>
<option value="3" selected="{{option3Selected 'Option 3'}}" >Option 3</option>
<option value="4" selected="{{option3Selected 'Option 4'}}" >Option 34</option>
</select>
Replace the above with this
Step 1.
<div class="ui selection dropdown">
<input type="hidden" name="test" value="" />
<div class="text">Test</div>
<i class="dropdown icon"></i>
<div class="menu">
<div class="item" data-value="">Not Selected</div>
<div class="item" data-value="A">A</div>
<div class="item" data-value="B">B</div>
</div>
Step 2:
meteor add semantic:ui-dropdown
meteor add semantic:ui-transition
Setting Selected
$(".ui.dropdown").dropdown("set selected", "A");
getting Selected.
var data = $('.ui.dropdown').dropdown('get value');
Comments
Post a Comment