I have this code but I don't know how to get selected value.Where should i give id value for this list?
<div class="ui compact menu">
<div class="ui simple dropdown item">Question
<i class="dropdown icon"></i>
<div id="question" class="menu">
<div id="type" class="item" data-value="mcsc">Multiple Choice Single Correct</div>
<div id="type" class="item" data-value="mcmc">Multiple Choice Multiple Correct</div>
<div id="type" class="item" data-value="numerical">Numerical</div>
</div>
</div>
</div>
A drop-down list (abbreviated drop-down, or DDL; also known as a drop-down menu, drop menu, pull-down list, picklist) is a graphical control element, similar to a list box, that allows the user to choose one value from a list. When a drop-down list is inactive, it displays a single value.
Use any element to open the dropdown menu, e.g. a <button>, <a> or <p> element. Use a container element (like <div>) to create the dropdown menu and add the dropdown links inside it. Wrap a <div> element around the button and the <div> to position the dropdown menu correctly with CSS.
Should I use "drop-down menu" or "dropdown menu" in writing? When writing documentation or describing a drop-down menu, use "drop-down menu" unless you're describing a function, option, or command with no hyphen.
You must use something like this:
$('#idDropDown').dropdown('get value');
I hope that helps you.
Docs for this can be found in last table here: https://semantic-ui.com/modules/dropdown.html#/usage
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With