jQuery到document.ready的Javascript代码

时间:2018-01-10 22:00:14

标签: javascript jquery

我正在努力用纯JavaScript构建五彩纸屑效果。现在,当我尝试使用DOMContentlocaded方法转换以下代码时,我收到了nan错误:

$(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);
  });

这里是小提琴链接:Confetti Link

0 个答案:

没有答案