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
    listenerfunction

    The function to run when the event occurs

    Returns
    function

    Runs the function when the event occurs.

    Example

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