File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,27 @@ have a `.progress` property, or a `.elements` property which is a list of object
9090` .progress ` properties. Pace will automatically handle all scaling to make the progress
9191changes look smooth to the user.
9292
93+ Elements
94+ --------
95+
96+ Elements being rendered to the screen is one way for us to decide that the page has been
97+ rendered. If you would like to use that source of information (not required at all),
98+ specify one or more selectors. You can comma seperate the selectors to propertly handle
99+ error states, where the progress bar should disappear, but the element were looking for
100+ may never apper:
101+
102+ ``` javascript
103+ paceOptions = {
104+ elements: {
105+ selectors: [' .timeline,.timeline-error' , ' .user-profile,.profile-error' ]
106+ }
107+ }
108+ ```
109+
110+ Pace will consider the elements test successful when each selector matches something. For
111+ this example, when either ` .timeline ` or ` .timeline-error ` exist, and either ` .user-profile `
112+ or ` .profile-error ` exit.
113+
93114Restart Rules
94115-------------
95116
@@ -104,7 +125,7 @@ paceOptions: {
104125
105126You can always trigger a restart manually by calling ` Pace.restart() `
106127
107- See [ the source] ( pace.coffee ) for a full list of all options.
128+ See [ the source] ( https://github.com/HubSpot/pace/blob/master/ pace.coffee) for a full list of all options.
108129
109130API
110131---
You can’t perform that action at this time.
0 commit comments