Methods
-
<static> setupPullToRefresh(element, refreshFunc, options)
-
Setup content container for pull to refresh capability. This method adds touch listeners on the content container. The following events are fired by this method: ojpull is fired when user pulls the content container, the event contains the content element as well as the distance pulled in pixels. ojrelease is fired when user releases the content container, the event contains the content element. ojcomplete is fired when the refresh is done and the panel is completely closed. The event contains the content element.
Parameters:
Name Type Argument Description elementElement the DOM element that hosts the content to refresh refreshFuncfunction() the function to invoke when refresh is triggered. It must return a Promise. optionsObject <optional>
optional values that controls aspects of pull to refresh Properties
Name Type Description thresholdnumber the number of pixel to pull until refresh is triggered primaryTextstring the primary text to display secondaryTextstring the secondary text to display - Source:
- See:
-
<static> tearDownPullToRefresh(element)
-
Removes the listener that was added in setupPullToRefresh. Page authors should call tearDownPullToRefresh when the content container is no longer needed.
Parameters:
Name Type Description elementElement the DOM element that hosts the content to refresh - Source:
- See: