This little task is causing a bigger headache than it needs. I just wanna get a simple dropdown like:
Pretty easy, right? It even gives me the code? How hard could it be? I first imported the CDN in my page.
<head>
<!-- stuff -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.8/semantic.min.css">
</head>
and then after all that, I add:
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.8/semantic.min.js"></script>
According to their documentation, all I need to do is:
$('.ui.dropdown')
.dropdown()
;
on my ui-dropdown
class element, but it just gives me problems.
<Uncaught TypeError: $(...).dropdown is not a function
I looked at the following things to help, but didn't have much luck:
- Semantic-UI Dropdown Not Working #229
- semantic-ui dropdown menu do not work but didn't have luck
- Moving jQUery so it loads first
- Adding the simple class
It just looks like no matter what I do... the script isn't getting initialised.