You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<desc>Triggered twice during the page change cyle: First prior to any page loading or transition and next after page loading completes successfully, but before the browser history has been modified by the navigation process.</desc>
5
5
<longdesc>
6
6
<p>When received with <code>data.toPage</code> set to a string, the event indicates that navigation is about to commence. The value stored in <code>data.toPage</code> is the URL of the page that will be loaded.</p>
7
7
<p>When received with <code>data.toPage</code> set to a jQuery object, the event indicates that the destination page has been loaded and navigation will continue.</p>
8
8
<p>During the handling of this event the browser's history has not yet changed.</p>
9
9
<p>In addition to the <code>event</code> parameter, handlers of this event will receive a second parameter, <code>data</code>. The second parameter is an object containing the following properties:</p>
10
-
<ul>
10
+
<ul>
11
11
<li><code>toPage</code> (object or string)
12
12
<ul>
13
13
<li>This property represents the page the caller wishes to make active. It can be either a jQuery collection object containing the page DOM element, or an absolute/relative url to an internal or external page. The value exactly matches the 1st arg to the changePage() call that triggered the event.</li>
@@ -19,7 +19,8 @@
19
19
</ul>
20
20
</li>
21
21
</ul>
22
-
<p>It should be noted that callbacks can modify both the <code>toPage</code> and <code>options</code> properties to alter the behavior of the current <code>changePage()</code> call. So for example, the <code>toPage</code> can be mapped to a different url from within a callback to do a sort of redirect.</p>
22
+
<p>It should be noted that callbacks can modify both the <code>toPage</code> and <code>options</code> properties to alter the behavior of the current <code>changePage()</code> call. So for example, the <code>toPage</code> can be mapped to a different url from within a callback to do a sort of redirect.</p>
alert( "This page was just inserted into the dom!" );
9
-
});
10
-
]]></code></pre>
11
-
12
-
<p>Note that by binding to pagebeforecreate, you can manipulate markup before jQuery Mobile's default widgets are auto-initialized. For example, say you want to add data attributes via JavaScript instead of in the HTML source, this is the event you'd use.</p>
// manipulate this page before its widgets are auto-initialized
17
-
});
18
-
]]></code></pre>
6
+
<p><strong>Note:</strong>This event is part of the <code><ahref="/page/">page</a></code> widget as of jQuery Mobile 1.4.0. Please consult the documentation for the page widget's <ahref="/page/#event-create">implementation</a>.</p>
<desc>This event is triggered after the <code>changePage()</code> request has finished loading the page into the DOM and all page transition animations have completed. </desc>
5
5
<longdesc>
6
6
<p>Note that any pageshow or pagehide events will have fired *BEFORE* this event is triggered. Callbacks for this particular event will be passed a data object as the 2nd arg. The properties for this object are as follows: </p>
7
-
<ul>
8
-
<li><code>toPage</code> (object or string)
9
-
<ul>
10
-
<li>This property represents the page the caller wishes to make active. It can be either a jQuery collection object containing the page DOM element, or an absolute/relative url to an internal or external page. The value exactly matches the 1st arg to the changePage() call that triggered the event.</li>
11
-
</ul>
12
-
</li>
13
-
<li><code>options</code> (object)
14
-
<ul>
15
-
<li>This object contains the configuration options to be used for the current <code>changePage()</code> call.</li>
16
-
</ul>
17
-
</li>
18
-
</ul>
19
-
7
+
<ul>
8
+
<li><code>toPage</code> (object or string)
9
+
<ul>
10
+
<li>This property represents the page the caller wishes to make active. It can be either a jQuery collection object containing the page DOM element, or an absolute/relative url to an internal or external page. The value exactly matches the 1st arg to the changePage() call that triggered the event.</li>
11
+
</ul>
12
+
</li>
13
+
<li><code>options</code> (object)
14
+
<ul>
15
+
<li>This object contains the configuration options to be used for the current <code>changePage()</code> call.</li>
Copy file name to clipboardExpand all lines: entries/pagecontainer.xml
+108-1
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,25 @@
86
86
</options>
87
87
88
88
<events>
89
+
<eventname="beforechange">
90
+
<desc>Triggered during the page change cyle prior to any page loading or transition.</desc>
91
+
<argumentname="event"type="Event" />
92
+
<argumentname="ui"type="Object">
93
+
<propertyname="toPage">
94
+
<desc>This property represents the page the caller wishes to make active. It can be either a jQuery collection object containing the page DOM element, or an absolute/relative url to an internal or external page. The value exactly matches the 1st arg to the changePage() call that triggered the event.</desc>
95
+
<typename="jQuery"/>
96
+
<typename="String"/>
97
+
</property>
98
+
<propertyname="prevPage">
99
+
<desc>A jQuery collection object that contains the from page DOM element.</desc>
100
+
<typename="jQuery"/>
101
+
</property>
102
+
<propertyname="options">
103
+
<desc>The configuration options to be used for the current <code>change()</code> call</desc>
104
+
<typename="jQuery"/>
105
+
</property>
106
+
</argument>
107
+
</event>
89
108
<eventname="beforehide">
90
109
<desc>Triggered before the actual transition animation is kicked off.</desc>
91
110
<argumentname="event"type="Event" />
@@ -94,6 +113,14 @@
94
113
<desc>A jQuery collection object that contains the destination page DOM element.</desc>
95
114
<typename="jQuery"/>
96
115
</property>
116
+
<propertyname="toPage">
117
+
<desc>A jQuery collection object that contains the destination page DOM element.</desc>
118
+
<typename="jQuery"/>
119
+
</property>
120
+
<propertyname="prevPage">
121
+
<desc>A jQuery collection object that contains the from page DOM element.</desc>
122
+
<typename="jQuery"/>
123
+
</property>
97
124
</argument>
98
125
</event>
99
126
<eventname="beforeload">
@@ -114,6 +141,14 @@
114
141
<desc>The filtered version of absUrl to be used when identifying the page and updating the browser location when the page is made active.</desc>
115
142
<typename="String"/>
116
143
</property>
144
+
<propertyname="toPage">
145
+
<desc>A string containing the url being loaded</desc>
146
+
<typename="String"/>
147
+
</property>
148
+
<propertyname="prevPage">
149
+
<desc>A jQuery collection object that contains the from page DOM element.</desc>
150
+
<typename="jQuery"/>
151
+
</property>
117
152
<propertyname="deferred">
118
153
<desc>Deferred to be resolved or rejected upon completion of content load. Callbacks that call <code>preventDefault()</code> on the event <strong>MUST</strong> call <code>resolve()</code> or <code>reject()</code> on this object so that <code>change()</code> requests resume processing. Deferred object observers expect the deferred object to be resolved like this:
<desc>This property represents the page to which the caller wishes to transition. It is a jQuery collection object containing the page DOM element.</desc>
228
+
<desc>A jQuery collection object that contains the destination page DOM element.</desc>
190
229
<typename="jQuery" />
191
230
</property>
231
+
<propertyname="prevPage">
232
+
<desc>A jQuery collection object that contains the from page DOM element.</desc>
233
+
<typename="jQuery"/>
234
+
</property>
235
+
</argument>
236
+
</event>
237
+
<eventname="change">
238
+
<desc>This event is triggered after the change request has finished loading the page into the DOM and all page transition animations have completed.</desc>
239
+
<argumentname="event"type="Event" />
240
+
<argumentname="ui"type="Object">
241
+
<propertyname="prevPage">
242
+
<desc>A jQuery collection object that contains the source page DOM element.</desc>
243
+
<typename="jQuery"/>
244
+
</property>
245
+
<propertyname="toPage">
246
+
<desc>A jQuery collection object that contains the destination page DOM element.</desc>
<desc>According to the jQuery Core <ahref="//api.jquery.com/jQuery.ajax/">documentation</a>, this will be a string describing the status. This is what gets passed as the 2nd argument to the framework's <code>$.ajax()</code> error callback. It may also be <code>null</code>.</desc>
255
324
<typename="String" />
256
325
</property>
326
+
<propertyname="toPage">
327
+
<desc>A jQuery collection object that contains the destination page DOM element.</desc>
328
+
<typename="jQuery"/>
329
+
</property>
330
+
<propertyname="prevPage">
331
+
<desc>A jQuery collection object that contains the from page DOM element in a detached state.</desc>
<desc>The filtered version of absUrl to be used when identifying the page and updating the browser location when the page is made active.</desc>
275
352
<typename="String"/>
276
353
</property>
354
+
<propertyname="toPage">
355
+
<desc>A string containing the url the was attempted to be loaded.</desc>
356
+
<typename="String"/>
357
+
</property>
358
+
<propertyname="prevPage">
359
+
<desc>A jQuery collection object that contains the from page DOM element.</desc>
360
+
<typename="jQuery"/>
361
+
</property>
277
362
<propertyname="deferred">
278
363
<desc>Callbacks that call <code>preventDefault()</code> on the event, <strong>MUST</strong> call <code>resolve()</code> or <code>reject()</code> on this object so that <code>change()</code> requests resume processing. Deferred object observers expect the deferred object to be resolved like this:
<desc>Triggered just before the framework attempts to remove an external page from the DOM.</desc>
422
+
<argumentname="event"type="Event" />
423
+
<argumentname="ui"type="Object">
424
+
<propertyname="toPage">
425
+
<desc>A jQuery collection object that contains the destination page DOM element.</desc>
426
+
<typename="jQuery"/>
427
+
</property>
428
+
<propertyname="prevPage">
429
+
<desc>The page about to be removed</desc>
430
+
<typename="jQuery"/>
431
+
</property>
432
+
</argument>
433
+
</event>
335
434
<eventname="show">
336
435
<desc>Triggered after the transition animation has completed.<strong>Note:</strong> Unlike the deprecated <code>pageshow</code> event, this event is not triggered on the "toPage" but the <placeholdername="name"/> widget's element.
337
436
<p>You can access the <code>prevPage</code> properties via the second argument of a bound callback function. For example: </p>
<desc>A jQuery collection object that contains the destination page DOM element.</desc>
448
+
<typename="jQuery"/>
449
+
</property>
347
450
<propertyname="prevPage">
348
451
<desc>A jQuery collection object that contains the page DOM element that we just transitioned away from. Note that this collection is empty when the first page is transitioned in during application startup.</desc>
<desc>Triggered just before the framework attempts to remove an external page from the DOM.</desc>
5
5
<longdesc>
6
6
<p>By default, the framework removes any non active dynamically loaded external pages from the DOM as soon as the user navigates away to a different page. The <code>pageremove</code> event is dispatched just before the framework attempts to remove the page from the DOM.</p>
7
7
<p>This event is triggered just before the framework attempts to remove an external page from the DOM. Event callbacks can call preventDefault on the event object to prevent the page from being removed. </p>
<strong>Note:</strong> The triggering of this event is deprecated as of jQuery Mobile 1.4.3. It will no longer be triggered in 1.6.0.
4
+
<p>The replacement for <code><placeholdername="name"/></code> is the <code><ahref="/pagecontainer/">pagecontainer</a></code> widget's <code><placeholdername="new-event-name"/></code> event. In jQuery Mobile >= 1.4.3, the two events are identical except for their name and the fact that <code><placeholdername="new-event-name"/></code> is triggered on the pagecontainer, whereas <code><placeholdername="name"/></code> is triggered on the page.</p>
<strong>Note:</strong> The triggering of this event is deprecated as of jQuery Mobile 1.4.0. It will no longer be triggered in 1.5.0.
3
+
<strong>Note:</strong> The triggering of this event is deprecated as of jQuery Mobile 1.4.0. It will no longer be triggered in 1.6.0.
4
4
<p>The replacement for <code><placeholdername="name"/></code> is the <code><ahref="/pagecontainer/">pagecontainer</a></code> widget's <code><placeholdername="new-event-name"/></code> event. In jQuery Mobile 1.4.0, the two events are identical except for their name and the fact that <code><placeholdername="new-event-name"/></code> is triggered on the pagecontainer, whereas <code><placeholdername="name"/></code> is triggered on the page.</p>
0 commit comments