Semantic-UI icon indicating copy to clipboard operation
Semantic-UI copied to clipboard

Menu dropdown item not working; code copied exactly from doc

Open paulwal opened this issue 11 years ago • 4 comments

Here it is: http://www.sessionlessons.com/t1

I copied the markup directly from an example on the Menu documentation page. I also copied the script and stylesheet links the documentation page is using. The dropdown menu is not appearing, though it does appear for me on the documentation page.

I had previously been trying to get it to work with Semantic 2.0 to no avail: http://www.sessionlessons.com/8

I'm on Mac OS X 10.10 and I'm experiencing the issue in both Safari and Chrome. I haven't tried other browsers.

paulwal avatar Jun 01 '15 19:06 paulwal

First example is missing jQuery. Both examples are missing dropdown initialization code. Read usage tab in docs, basically u need $('.ui.dropdown').dropdown()

slb235 avatar Jun 01 '15 19:06 slb235

Awesome, that was it. Thanks a ton. I'll RTFM better here on out.

paulwal avatar Jun 01 '15 19:06 paulwal

Perhaps it'd be beneficial to note this in the Menu doc to help noobs who haven't read the Dropdown doc yet. Like maybe just adding this to the Menu examples that have a dropdown:

<script>
    /* Initialize the Dropdown module (see Dropdown doc) */
    $('.ui.dropdown').dropdown();
</script>

paulwal avatar Jun 01 '15 19:06 paulwal

A related usage question... if I click on the any item in the menu, then the active class is not changing to that item. Is there some other setup required to enable that?

omairabdullah avatar Jun 08 '15 04:06 omairabdullah