Description

A Twigkit service that will fire an event when the window is scrolled or resized.

Methods

bindListener(listener)

A method for binding functions to a listener.
Parameters
ParamTypeDetails
listenerfunctionThe function to run when the event occurs
Returns
functionRuns the function when the event occurs.

Example

  scrollAndResizeListener.bindListener(function(){
  console.log('Window Scrolled or Resized');
  });