sandoche / Darkmode.js

🌓 Add a dark-mode / night-mode to your website in a few seconds
https://darkmodejs.learn.uno
MIT License
2.72k stars 176 forks source link

Darkmode.js, possible issue with jQuery and Bootstrap 4 #44

Closed ashmlk closed 3 years ago

ashmlk commented 4 years ago

Hi, I tried adding ```

    <script>
    $(document).ready(function () {
      var options = {
      bottom: '64px', // default: '32px'
      right: 'unset', // default: '32px'
      left: '32px', // default: 'unset'
      time: '0.5s', // default: '0.3s'
      mixColor: '#fff', // default: '#fff'
      backgroundColor: '#fff',  // default: '#fff'
      buttonColorDark: '#100f2c',  // default: '#100f2c'
      buttonColorLight: '#fff', // default: '#fff'
      saveInCookies: false, // default: true,
      label: '🌓', // default: ''
      autoMatchOsTheme: true // default: true
    }
    const darkmode = new Darkmode(options);
    darkmode.showWidget();
    });

    </script>

To my website and It seems that it is not working at all, I simply cannot click on the Dakrmode button. Is there anything that can help me fix this issue?
extant1 commented 3 years ago

I had the same issue and adding the following line into my .css file fixed the issue.

.darkmode-layer, .darkmode-toggle { z-index: 500; }