Dropdown Semantic-UI: Change the hidden filed values?-open source projects Semantic-Org/Semantic-UI

Ionică Bizău

I checked out the source code of SemanticUI library and I found that the module functions are stored in data() using jQuery.

So, to access dropdown methods for your element you will do:

 $(".ui.selection").data().moduleDropdown

Change value is actually action.activate(text, value) function.

For example, to set Alpha-Female value you will do:

 $(".ui.selection")
   .data()
   .moduleDropdown
   .action
   .activate(undefined, "Alpha-Female")
 ;

JSFIDDLE