apeatling / web-pull-to-refresh

A native-like JavaScript pull to refresh implementation for the web.
https://apeatling.com/articles/javascript-pull-to-refresh-web/
MIT License
545 stars 93 forks source link

Where do i add in the optional parameters?? #18

Closed clarklight closed 8 years ago

clarklight commented 8 years ago

I am not sure where do i change these, if i change the contentEI inside the wptr.1.1.js then the "animation" part stopped working.

{
    // ID of the element holding dragable content area
    contentEl: 'content', 

    // ID of the element holding pull to refresh loading area
    ptrEl: 'ptr', 

    // Number of pixels of dragging down until refresh will fire
    distanceToRefresh: 70, 

  // The dragging resistance level, the higher the more you'll need to drag down.
  resistance: 2.5
}