{"id":8122,"date":"2015-11-27T03:33:18","date_gmt":"2015-11-27T03:33:18","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/11\/27\/dropdown-semantic-ui-change-the-hidden-filed-values-open-source-projects-semantic-org-semantic-ui\/"},"modified":"2022-08-30T15:42:25","modified_gmt":"2022-08-30T15:42:25","slug":"dropdown-semantic-ui-change-the-hidden-filed-values-open-source-projects-semantic-org-semantic-ui","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/11\/27\/dropdown-semantic-ui-change-the-hidden-filed-values-open-source-projects-semantic-org-semantic-ui\/","title":{"rendered":"Dropdown Semantic-UI: Change the hidden filed values?-open source projects Semantic-Org\/Semantic-UI"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/84352b749bca68ff058e27fca784d2d5?s=128&amp;d=identicon&amp;r=PG\" \/> <strong>Ionic\u0103 Biz\u0103u<\/strong><\/p>\n<p>I checked out the source code of SemanticUI library and I found that the module functions are stored in <code>data()<\/code> using jQuery.<\/p>\n<p>So, to access dropdown methods for your element you will do:<\/p>\n<pre><code> $(\".ui.selection\").data().moduleDropdown\n<\/code><\/pre>\n<p>Change value is actually <code>action.activate(text, value)<\/code> function.<\/p>\n<p>For example, to set <code>Alpha-Female<\/code> value you will do:<\/p>\n<pre><code> $(\".ui.selection\")\n   .data()\n   .moduleDropdown\n   .action\n   .activate(undefined, \"Alpha-Female\")\n ;\n<\/code><\/pre>\n<p><strong>JSFIDDLE<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ionic\u0103 Biz\u0103u 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: $(&#8220;.ui.selection&#8221;).data().moduleDropdown Change value is actually action.activate(text, value) function. For example, to set Alpha-Female value you will do: $(&#8220;.ui.selection&#8221;) .data() .moduleDropdown [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,1],"tags":[],"class_list":["post-8122","post","type-post","status-publish","format-standard","hentry","category-semantic","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=8122"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8122\/revisions"}],"predecessor-version":[{"id":8604,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8122\/revisions\/8604"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=8122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=8122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=8122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}