Javascript - execute multiple different [removed]

后端 未结 2 918
情话喂你
情话喂你 2020-12-31 19:05

I am facing a little problem here. I have basic knowledge about Javascript and i want to do the following:

Right now, when you scroll down, the menu will get smaller

2条回答
  •  無奈伤痛
    2020-12-31 19:44

    You override onscroll function by doing window.onscroll = blabla

    You can do :

    window.onscroll = function() {
      effects();
      test();
    }
    

    or

    window.addEventListener('scroll', effects);
    window.addEventListener('scroll', test);
    

提交回复
热议问题