creativetimofficial / argon-dashboard

Argon - Dashboard for Bootstrap 5 by Creative Tim
https://www.creative-tim.com/product/argon-dashboard
MIT License
674 stars 1.26k forks source link

Argon js is not loading extrictly after the page full load #91

Closed jrichardsz closed 2 years ago

jrichardsz commented 2 years ago

Expected Behavior

Load argon-dashboard.min.js correctly when full page is ready

Current Behavior

Some variables are broken in the official demo: image

Possible Solution

I solved setting everything starting from the line 29 https://github.com/creativetimofficial/argon-dashboard/blob/master/assets/js/argon-dashboard.js#L29 into a DOMContentLoaded event

(function() {
  var isWindows = navigator.platform.indexOf('Win') > -1 ? true : false;

  if (isWindows) {
    // if we are on windows OS we activate the perfectScrollbar function
    ....
})();

document.addEventListener("DOMContentLoaded", function(event) {
  //everything here
}); 

Steps to Reproduce

1.Clone this repository 2.Serve it using some static approach like nginx, apache, etc 3.Enter to the page

Context (Environment)

github-actions[bot] commented 2 years ago

@jrichardsz this issue was automatically closed because it did not follow the bellow rules:


IMPORTANT: Please use the following link to create a new issue:

https://www.creative-tim.com/new-issue/argon-dashboard

**If your issue was not created using the app above, it will be closed immediately.**

Love Creative Tim? Do you need Angular, React, Vuejs or HTML? You can visit:
👉  https://www.creative-tim.com/bundles
👉  https://www.creative-tim.com