Window scroll event is not firing in SharePoint

  • 1
  •  
  •  
  •  
  •  
  •  
    1
    Share

In SharePoint $(window).scroll() event is not firing because code is load in master page web part zone. SharePoint master page doesn’t use the scrolling on the “body” tag.

Add scroll event on div tag with ID=”s4-workspace”. Replace $(window).scroll() code with something like bellow

$(‘#s4-workspace’).scroll(function() {

alert(‘Hi’);

});

Leave a Reply

Your email address will not be published.

11 − 10 =