-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="semantic/dist/semantic.min.js"></script>
<link rel="stylesheet" type="text/css" href="semantic/dist/semantic.min.css"> <body>
<div class="ui slider"></div>
</body> $('.ui.slider').slider(); The slider isn't appearing. I don't know why. Any help is appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Your code is fine. It seems you have put semantic.min.css and semantic.min.js to a different location, so the browser cannot find them by the relative path in your code Try to use jsdelivr cdn <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.css"> |
Beta Was this translation helpful? Give feedback.
-
The CDN did not help. I am using Electron if that helps. I have a table and button working fine with Fomantic-UI right now. EDIT: <!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.css">
<script src="js/index.js"></script>
</head>
<body>
<div class="ui slider"></div>
</body>
</html> index.js $('.ui.slider').slider(); The browser finds and loads everything, but does not load the slider. |
Beta Was this translation helpful? Give feedback.
-
Could you ensure that Also, sharing debug console log of |
Beta Was this translation helpful? Give feedback.
-
I fixed it. It was being run before the page was initialized. I wasn't calling it in an onload function. |
Beta Was this translation helpful? Give feedback.
-
Ah, that is a common mistake 😉 Closing as resolved. |
Beta Was this translation helpful? Give feedback.
I fixed it. It was being run before the page was initialized. I wasn't calling it in an onload function.