0

I am working to build a confetti effect with pure JavaScript. right now i am getting nan error when i try to convert the following code with DOMContentlocaded method:

$(document).ready(function(){

    console.log("Inside the DOMCONTENT LOADED FUNCTION")
      SetGlobals();
      //InitializeButton();
      InitializeConfetti();

      window.resize = function (event) {
          W = window.innerWidth;
          H = window.innerHeight;
          canvas.width = W;
          canvas.height = H;
      };
      window.setTimeout(DeactivateConfetti, 4000000);
  });

Here's the fiddle link: Confetti Link

Serving Quarantine period
  • 66,345
  • 10
  • 43
  • 85
Victor
  • 67
  • 1
  • 9
  • I have followed this article too however, for unknown reason this code is not working – Victor Jan 10 '18 at 22:16
  • if you can be a bit more clear on what the unknown reason is (in your question) i will consider reopening if it makes it not a duplicate. – Kevin B Jan 10 '18 at 22:26

0 Answers0