1

Why this javascript function isn't working. The console.log is working but rest is not working. Chrome is returning this --> Uncaught TypeError: Cannot read properties of null (reading 'style') at scaleMe. How can I fix this? Please I need help.

JAVASCRIPT

  function scaleMe()
  { 
      console.log('hello-here'); 
      const mypage = window.innerWidth;
      document.getElementById("Web_1920__1").style.transform = "scale("+mypage/3554+")";
      document.getElementById("Web_1920__1").style.transformOrigin = "0 0"; 
  }
  scaleMe();
Soumya Roy
  • 265
  • 3
  • 11

0 Answers0