{"id":8153,"date":"2015-11-28T07:08:14","date_gmt":"2015-11-28T07:08:14","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/11\/28\/semantic-ui-dynamic-dropdown-open-source-projects-semantic-org-semantic-ui\/"},"modified":"2022-08-30T15:42:25","modified_gmt":"2022-08-30T15:42:25","slug":"semantic-ui-dynamic-dropdown-open-source-projects-semantic-org-semantic-ui","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/11\/28\/semantic-ui-dynamic-dropdown-open-source-projects-semantic-org-semantic-ui\/","title":{"rendered":"Semantic-UI Dynamic Dropdown-open source projects Semantic-Org\/Semantic-UI"},"content":{"rendered":"<p>Got a problem with semantic-ui dropdown.<br \/>\nI&#8217;ve been using Semantic-Ui, and wanted to change the dropdown item dynamically. That is, when i choose the value from the first dropdown, the second dropdown&#8217;s item will change. But the thing is, when the items are changed, the second dropdown cannot be chose, the value won&#8217;t change. The dropdown won&#8217;t collapse back.<\/p>\n<p>The HTML<br \/>\nThe First Dropdown<\/p>\n<pre><code>\n    \n    Choose..\n    \n    \n       Car\n       Tank\n       Plane\n    \n\n<\/code><\/pre>\n<p>Second Dropdown<\/p>\n<pre><code>\n    \n    Choose..\n    \n    \n        Choose..\n    \n\n<\/code><\/pre>\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<br \/>\nThe jQuery<\/p>\n<pre><code>$(\"#programmetype\").dropdown({\n            onChange: function (val) {\n                if (val == \"val1\")\n                {\n                    $('#servicetype .menu').html(\n                        'Saloon' +\n                        'Truck'\n                        );\n                };\n\n                if (val == \"val2\")\n                {\n                    $('#servicetype .menu').html(\n                        'Abraham' +\n                        'Leopard' +\n                        );\n                };\n\n                if (val == \"val3\")\n                {\n                    $('#servicetype .menu').html(\n                        'Jet' +\n                        'Bomber' +\n                        );\n                };\n            }\n        });\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Got a problem with semantic-ui dropdown. I&#8217;ve been using Semantic-Ui, and wanted to change the dropdown item dynamically. That is, when i choose the value from the first dropdown, the second dropdown&#8217;s item will change. But the thing is, when the items are changed, the second dropdown cannot be chose, the value won&#8217;t change. The [&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-8153","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\/8153","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=8153"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8153\/revisions"}],"predecessor-version":[{"id":8577,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8153\/revisions\/8577"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=8153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=8153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=8153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}