SPFx webpart - jQuery scroll not working

Highlighted
Contributor

Hi

 

I'm trying to use jQuery scroll in a webpart. I'm finding that the event does not look like it's being triggered. To investigate this, I put the following at the bottom of the render method, before the closing brace.

 

$(window).scroll((): any => {
  alert("got here");
});

The alert is never triggered.

 

Should this work? Am I doing something wrong?

 

Thanks.

0 Replies