Events


Start

Fires when the user touch or click the element (see simulateTouch)

Example:

.on("start.pulltorefresh", function (evt, y){})

Parameters:

  • evt Original event (mousedown or touchstart)
  • y Position of element on Y axis

Move

Fires when the user move the element (see sensibility)

Example:

.on("move.pulltorefresh", function (evt, percent){})

Parameters:

  • evt Original event (mousemove or touchmove)
  • percent Percentage of pull moviment based on option refresh

End

Fires when the touch event stop

Example:

.on("end.pulltorefresh", function (evt){})

Parameters:

  • evt Original event (mouseup or touchend)

Refresh

Fires when the touch distance variation of the initial point to the end point is greater or equal to refresh

Example:

.on("refresh.pulltorefresh", function ($element, y){})

Parameters:

  • $element jQuery element
  • y Position of element on Y axis

Examples of events

All examples are hosted on codepen.io under tag jquery-p2r