Closed roelreijneveld closed 4 years ago
This is similar to my issue in https://github.com/halfmoonui/halfmoon/issues/20, basically the halfmoon.pageWrapper
is not being initialized. Are you using a framework like React? The issue with that is the HTML doesn't exist when the page is loaded, therefore the selector for pageWrapper
doesn't get initialized.
You need to add the <script src="path/to/halfmoon.min.js"></script>
to the end of the DOM's body if you want the inline onclick
functions to work. I recommend using the starter template generator. I re-built your page and added to the end of the DOM's body and it worked properly.
Thanks for your comments! I've moved the halfmoon.min.js to the end of the page from the <head>
section. It works like a charm now.
Hi there, I really like the Halfmoon framework. It's so beautiful, functional and yet simple. My compliments!
However, I have run into a problem which I cannot solve. I am developing a theme for a billing system (WHMCS) and have started designing the sidebar. However, it won't open when I press a button with
onclick="halfmoon.toggleSidebar()"
. The dark mode switch is working correctly so I don't think it is a problem with the JavaScript library. Can someone tell me what the problem is? The URL is https://dev.proxeuse.nl/whmcs/.Thanks in advance! Kind regards