ebd2f78ba504c9849888168d6395a943e5040597
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.0.1pre / docs / api / methods.html
1 <!DOCTYPE html> 
2 <html> 
3         <head>
4         <meta charset="utf-8">
5         <meta name="viewport" content="width=device-width, initial-scale=1"> 
6         <title>jQuery Mobile Docs - Methods</title> 
7         <link rel="stylesheet"  href="../../css/themes/default/" /> 
8         <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
9         <script src="../../js/jquery.js"></script>
10         <script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
11         <script src="../_assets/js/jqm-docs.js"></script>
12         <script src="../../js/"></script>
13 </head> 
14 <body> 
15
16 <div data-role="page" class="type-interior">
17
18         <div data-role="header" data-theme="f">
19                 <h1>Methods</h1>
20                 <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
21         </div><!-- /header -->
22
23         <div data-role="content">
24         <div class="content-primary">
25
26           <p>jQuery Mobile exposes several methods and properties on the $.mobile object for use in your applications.</p>
27                 
28
29                 <dl>
30                         <dt><code>$.mobile.changePage</code> (<em>method</em>)</dt>
31                         <dd>Programmatically change from one page to another. This method is used internally for the page loading and transitioning that occurs as a result of clicking a link or submitting a form, when those features are enabled.</dd>
32                         
33                         <dd>
34                                 
35                                 <dl>
36                                         <dt><code>&#183;</code> Arguments</dt>
37                                         <dd><code>to</code> (<em>string or object</em>, required)
38 <ul>
39                                 <li>String: Absolute or relative URL. (&quot;about/us.html&quot;)</li>
40                                                         <li>Object: jQuery collection object. (<code>$("#about")</code>)</li>
41                                                 </ul>
42                                         </dd>   
43                                                 
44                                         <dd><code>options</code> (<em>object</em>, optional)
45                                                 <ul>
46                                                         <li>Properties:
47                                                                 <ul>
48                                                                         <li><code>allowSamePageTransition</code> (<em>boolean</em>,     default:        false) By default, changePage() ignores requests to change to the current active page. Setting this option to true, allows the request to execute. Developers should note that some of the page transitions assume that the fromPage and toPage of a changePage request are different, so they may not animate as expected. Developers are responsible for either providing a proper transition, or turning it off for this specific case.</li>
49                                                                         <li><code>changeHash</code> (<em>boolean</em>,  default:        true) Decides if the hash in the location bar should be updated. </li>
50                                                                         <li><code>data</code> (<em>object</em> or       string, default: undefined) The data to send with an Ajax page request.
51                                                                                 <ul>
52                                                                                         <li>Used only when the 'to' argument of changePage() is a URL.</li>
53                                                                                 </ul>
54                                                                   </li>
55                                                                         <li><code>data-url</code> (string,      default: undefined) The URL to use when updating the browser location upon changePage completion.
56                                                                   If not specified, the value of the data-url attribute of the page element is used.</li>
57                                                                         <li><code>pageContainer</code> (jQuery collection,      default:        $.mobile.pageContainer) Specifies the element that should contain the page. </li>
58                                                                         <li><code>reloadPage</code> (<em>boolean</em>, default: false) Forces a reload of a page, even if it is already in the DOM of the page container.
59                                                                                 <ul>
60                                                                                         <li>Used only when the 'to' argument of changePage() is a URL.</li>
61                                                                                 </ul>
62                                                                         </li>
63                                                                   <li><code>reverse</code> (<em>boolean</em>,   default:        false) Decides what direction the transition will run when showing the page. </li>
64                                                                         <li><code>showLoadMsg</code> (<em>boolean</em>, default:        true) Decides whether or not to show the loading message when loading external pages.</li>
65                                                                         <li><code>role</code> (<em>string</em>, default:        undefined) The data-role value to be used when displaying the page. By default this is undefined which means rely on the value of the @data-role attribute defined on the element.</li>
66                                                                         <li><code>transition</code> (<em>string</em>,   default:        $.mobile.defaultPageTransition) The transition to use when showing the page. </li>
67                                                                         <li><code>type</code> (<em>string</em>, default: &quot;get&quot;) Specifies the method ("get" or "post") to use when making a page request. 
68                                                                                 <ul>
69                                                                                         <li>Used only when the 'to' argument of changePage() is a URL.</li>
70                                                                                 </ul>
71                                                                         </li>
72                                                                 </ul>
73                                                         </li>
74                                                 </ul>
75                                         </dd>   
76
77                                 </dl>
78                         </dd>
79                         
80                         <dd>Examples:
81                         <pre>
82                         <code>
83 <strong>//transition to the "about us" page with a slideup transition</strong>                  
84 $.mobile.changePage( "about/us.html", { transition: "slideup"} );       
85
86 <strong>//transition to the "search results" page, using data from a form with an ID of "search""       </strong>       
87 $.mobile.changePage( "searchresults.php", {
88         type: "post", 
89         data: $("form#search").serialize()
90 });             
91
92 <strong>//transition to the "confirm" page with a "pop" transition without tracking it in history       </strong>               
93 $.mobile.changePage( "../alerts/confirm.html", {
94         transition: "pop",
95         reverse: false,
96         changeHash: false
97 });     
98                 
99                         </code>
100                         </pre>
101                         
102                         </dd>
103                         
104                         
105                         <dt><code>$.mobile.loadPage</code> (<em>method</em>)</dt>
106                         <dd>Load an external page, enhance its content, and insert it into the DOM. This method is called internally by the changePage() function when its first argument is a URL. This function does not affect the current active page so it can be used to load pages in the background. The function returns a deferred promise object that gets resolved after the page has been enhanced and inserted into the document.</dd>
107                         
108                         <dd>
109                                 
110                                 <dl>
111                                         <dt><code>&#183;</code> Arguments</dt>
112                                         <dd><code>url</code> (<em>string or object</em>, required) A relative or absolute URL.</dd>     
113                                                 
114                                         <dd><code>options</code> (<em>object</em>, optional)
115                                                 <ul>
116                                                         <li>Properties:
117                                                                 <ul>
118                                                                         <li><code>data</code> (<em>object</em> or       string, default: undefined) The data to send with an Ajax page request. </li>
119                                                                         <li><code>loadMsgDelay</code> (<em>number (in ms)</em>, default: 50) Forced delay before the loading message is shown. This is meant to allow time for a page that has already been visited to be fetched from cache without a loading message.</li>
120                                                                         <li><code>pageContainer</code> (jQuery collection,      default:        $.mobile.pageContainer) Specifies the element that should contain the page after it is loaded. </li>
121                                                                         <li><code>reloadPage</code> (<em>boolean</em>, default: false) Forces a reload of a page, even if it is already in the DOM of the page container. </li>
122                                                                         <li><code>role</code> (<em>string</em>, default:        undefined) The data-role value to be used when displaying the page. By default this is undefined which means rely on the value of the @data-role attribute defined on the element.</li>
123                                                                         <li><code>type</code> (<em>string</em>, default: &quot;get&quot;) Specifies the method ("get" or "post") to use when making a page request. 
124                                                                         </li>
125                                                                 </ul>
126                                                         </li>
127                                                 </ul>
128                                         </dd>   
129
130                                 </dl>
131                         </dd>
132                         
133                         <dd>Examples:
134                         <pre>
135                         <code>
136 <strong>//load the "about us" page into the DOM</strong>                        
137 $.mobile.loadPage( "about/us.html" );   
138
139 <strong>//load a "search results" page, using data from a form with an ID of "search""  </strong>       
140 $.mobile.loadPage( "searchresults.php", {
141         type: "post", 
142         data: $("form#search").serialize()
143 });                             
144                         </code>
145                         </pre>
146                         
147                         </dd>
148                         
149                         
150                         <dt><code>jqmData(), jqmRemoveData()</code> (<em>method</em>)</dt>
151                         <dd>When working with jQuery Mobile, <code>jqmData</code> and <code>jqmRemoveData</code> should be used in place of jQuery core's <code>data</code> and <code>removeData</code> methods (note that this includes $.fn.data, $.fn.removeData, and the $.data, $.removeData, and $.hasData utilities), as they automatically incorporate getting and setting of namespaced data attributes (even if no namespace is currently in use).</dd>
152                         <dd>
153                                 <dl>
154                                         <dt><code>&#183;</code> Arguments:</dt>
155                                         <dd>See jQuery's <a href="http://api.jquery.com/jQuery.data/">data</a> and <a href="http://api.jquery.com/jQuery.removeData/">removeData</a> methods</dd>
156                                         <strong>Note: </strong>Calling jqmData() with no argument will return <code>undefined</code>. This behavior is subject to change in future versions.
157                                         <dt><code>&#183;</code> Also:</dt>
158                                         <dd>When finding elements by their jQuery Mobile data attribute, please use the custom selector <code>:jqmData()</code>, as it automatically incorporates namespaced data attributes into the lookup when they are in use. For example, instead of calling <code>$("div[data-role='page']")</code>, you should use <code>$("div:jqmData(role='page')")</code>, which internally maps to <code>$("div[data-"+ $.mobile.ns +"role='page']")</code> without forcing you to concatenate a namespace into your selectors manually.</dd>
159                                 </dl>
160                         </dd>
161
162                         
163                         
164                         
165                         <dt><code>$.mobile.showPageLoadingMsg</code> (<em></em>)</dt>
166                         <dd>Show the page loading message, which is configurable via $.mobile.loadingMessage.</dd>
167                         
168                         <dd>Example:
169                         <pre>
170                         <code>
171 <strong>//cue the page loader</strong>                  
172 $.mobile.showPageLoadingMsg();  
173                         </code>
174                         </pre>
175                         
176                         </dd>
177
178                         
179                         
180                         
181                         <dt><code>$.mobile.hidePageLoadingMsg</code> (<em></em>)</dt>
182                         <dd>Hide the page loading message, which is configurable via $.mobile.loadingMessage.</dd>
183                         
184                         <dd>Example:
185                         <pre>
186                         <code>
187 <strong>//cue the page loader</strong>                  
188 $.mobile.hidePageLoadingMsg();  
189                         </code>
190                         </pre>
191                         
192                         </dd>
193                         
194                         <dt><code>$.mobile.fixedToolbars.show</code> (<em>method</em>)</dt>
195                         <dd>Utility method for displaying the fixed header and/or footer of the current active page within the viewport. Note that fixed headers/footers are never really hidden. Toggling the show/hide state of a toolbar is really toggling whether or not they are inline within the page content, or displayed within the viewport as if they were fixed.</dd>
196                         <dd>
197                                 <dl>
198                                         <dt><code>&#183;</code> Arguments</dt>
199                                         <dd><code>immediately</code> (<em>boolean</em>, optional) If true, any fixed header or footer for the current active page is displayed immediately within the viewport. If false or unspecified, the fixed header/footer will fade-in after a 100 millisecond delay. Note that other events such as a document resize or scroll event can result in an additional delay before the start of the header/footer display animation.</dd>                                                   
200                                 </dl>
201                         </dd>
202                         <dd>Example:
203                         <pre>
204                         <code>
205 <strong>// Show fixed header/footer with a fade animation.</strong>                     
206 $.mobile.fixedToolbars.show();  
207
208 <strong>// Show fixed header/footer immediately.</strong>
209 $.mobile.fixedToolbars.show(true);      
210                         </code>
211                         </pre>
212                         
213                         </dd>
214
215                         <dt><code>$.mobile.fixedToolbars.hide</code> (<em>method</em>)</dt>
216                         <dd>Utility method for hiding the fixed header and/or footer of the current active page.</dd>
217                         <dd>
218                                 <dl>
219                                         <dt><code>&#183;</code> Arguments</dt>
220                                         <dd><code>immediately</code> (<em>boolean</em>, optional) If true, any fixed header or footer for the current active page is immediately placed inline (back in flow) with the page content, which means it will scroll along with the content and will only be visible when viewing the top or bottom of the page within the viewport. If false or unspecified, the fixed header/footer will fade-out after a 100 millisecond delay. Note that other events such as a document resize or scroll event can result in the header/footer being immediately hidden.</dd>                                                   
221                                 </dl>
222                         </dd>
223                         <dd>Example:
224                         <pre>
225                         <code>
226 <strong>// Hide fixed header/footer with a fade animation.</strong>                     
227 $.mobile.fixedToolbars.hide();  
228
229 <strong>// Hide fixed header/footer immediately.</strong>
230 $.mobile.fixedToolbars.hide(true);      
231                         </code>
232                         </pre>
233                         
234                         </dd>
235             
236                         <dt><code>$.mobile.path.parseUrl</code> (<em>method</em>)</dt>
237                         <dd>Utility method for parsing a URL and its relative variants into an object that makes accessing the components of the URL easy. When parsing relative variants, the resulting object will contain empty string values for missing components (like protocol, host, etc). Also, when parsing URLs that have no authority, such as tel: urls, the pathname property of the object will contain the data after the protocol/scheme colon.</dd>
238                         
239                         <dd>
240                                 
241                                 <dl>
242                                         <dt><code>&#183;</code> Arguments</dt>
243                                         <dd><code>url</code> (<em>string</em>, required) A relative or absolute URL.</dd>       
244                                                 
245                                         <dt><code>&#183;</code> Return Value</dt>
246                                         <dd>
247                                                 <p>This function returns an object that contains the various components of the URL as strings. The properties on the object mimic the browser's location object:</p>
248                                                 <dl>    
249                                                         <dt><code>hash</code></dt>
250                                                         <dd>The fragment conponent of the URL, including the leading '#' character.</dd>
251                                                         <dt><code>host</code></dt>
252                                                         <dd>The host and port number of the URL.</dd>
253                                                         <dt><code>hostname</code></dt>
254                                                         <dd>The name of the host within the URL.</dd>
255                                                         <dt><code>href</code></dt>
256                                                         <dd>The original URL that was parsed.</dd>
257                                                         <dt><code>pathname</code></dt>
258                                                         <dd>The path of the file or directory referenced by the URL.</dd>
259                                                         <dt><code>port</code></dt>
260                                                         <dd>The port specified within the URL. Most URLs rely on the default port for the protocol used, so this may be an empty string most of the time.</dd>
261                                                         <dt><code>protocol</code></dt>
262                                                         <dd>The protocol for the URL including the trailing ':' character.</dd>
263                                                         <dt><code>search</code></dt>
264                                                         <dd>The query component of the URL including the leading '?' character.</dd>
265                                                 </dl>   
266                                                 <p>But it also contains additional properties that provide access to additional components as well as some common forms of the URL developers access:</p>
267                                                 <dl>    
268                                                         <dt><code>authority</code></dt> 
269                                                         <dd>The username, password, and host components of the URL</dd> 
270                                                         <dt><code>directory</code></dt>
271                                                         <dd>The directory component of the pathname, minus any filename.</dd>   
272                                                         <dt><code>domain</code></dt>    
273                                                         <dd>The protocol and authority components of the URL.</dd>      
274                                                         <dt><code>filename</code></dt>  
275                                                         <dd>The filename within the pathname component, minus the directory.</dd>       
276                                                         <dt><code>hrefNoHash</code></dt>        
277                                                         <dd>The original URL minus the fragment (hash) components.</dd> 
278                                                         <dt><code>hrefNoSearch</code></dt>      
279                                                         <dd>The original URL minus the query (search) and fragment (hash) components.</dd>      
280                                                         <dt><code>password</code></dt>  
281                                                         <dd>The password contained within the authority component.</dd> 
282                                                         <dt><code>username</code></dt>  
283                                                         <dd>The username contained within the authority component.</dd> 
284                                                 </dl>   
285                                         </dd>   
286                                                 
287                                 </dl>
288                         </dd>
289                         
290                         <dd>Examples:
291                         <pre>
292                         <code>
293 <strong>// Parsing the Url below results an object that is returned with the
294 // following properties:
295 //
296 //  obj.href:         http://jblas:password@mycompany.com:8080/mail/inbox?msg=1234&amp;type=unread#msg-content
297 //  obj.hrefNoHash:   http://jblas:password@mycompany.com:8080/mail/inbox?msg=1234&amp;type=unread
298 //  obj.hrefNoSearch: http://jblas:password@mycompany.com:8080/mail/inbox
299 //  obj.domain:       http://jblas:password@mycompany.com:8080
300 //  obj.protocol:     http:
301 //  obj.authority:    jblas:password@mycompany.com:8080
302 //  obj.username:     jblas
303 //  obj.password:     password
304 //  obj.host:         mycompany.com:8080
305 //  obj.hostname:     mycompany.com
306 //  obj.port:         8080
307 //  obj.pathname:     /mail/inbox
308 //  obj.directory:    /mail/
309 //  obj.filename:     inbox
310 //  obj.search:       ?msg=1234&amp;type=unread
311 //  obj.hash:         #msg-content</strong>
312
313 var obj = $.mobile.path.parseUrl("http://jblas:password@mycompany.com:8080/mail/inbox?msg=1234");
314                         </code>
315                         </pre>
316                         
317                         </dd>
318                         
319             
320                         <dt><code>$.mobile.path.makePathAbsolute</code> (<em>method</em>)</dt>
321                         <dd>Utility method for converting a relative file or directory path into an absolute path.</dd>
322                         <dd>
323                                 <dl>
324                                         <dt><code>&#183;</code> Arguments</dt>
325                                         <dd><code>relPath</code> (<em>string</em>, required) A relative file or directory path.</dd>    
326                                         <dd><code>absPath</code> (<em>string</em>, required) An absolute file or relative path to resolve against.</dd> 
327                                                 
328                                         <dt><code>&#183;</code> Return Value</dt>
329                                         <dd>This function returns a string that is an absolute version of the relative path passed in.</dd>     
330                                                 
331                                 </dl>
332                         </dd>
333                         <dd>Examples:
334                         <pre>
335                         <code>
336 <strong>// Returns: /a/b/c/file.html</strong>
337 var absPath = $.mobile.path.makePathAbsolute("file.html", "/a/b/c/bar.html");
338
339 <strong>// Returns: /a/foo/file.html</strong>
340 var absPath = $.mobile.path.makePathAbsolute("../../foo/file.html", "/a/b/c/bar.html");
341
342                         </code>
343                         </pre>
344                         </dd>
345                         
346             
347                         <dt><code>$.mobile.path.makeUrlAbsolute</code> (<em>method</em>)</dt>
348                         <dd>Utility method for converting a relative URL to an absolute URL.</dd>
349                         <dd>
350                                 
351                                 <dl>
352                                         <dt>Arguments</dt>
353                                         <dd><code>relUrl</code> (<em>string</em>, required) A relative URL.</dd>        
354                                         <dd><code>absUrl</code> (<em>string</em>, required) An absolute URL to resolve against.</dd>    
355                                                 
356                                         <dt>Return Value</dt>
357                                         <dd>This function returns a string that is an absolute version of the relative URL passed in.</dd>      
358                                                 
359                                 </dl>
360                         </dd>
361                         <dd>Examples:
362                         <pre>
363                         <code>
364 <strong>// Returns: http://foo.com/a/b/c/file.html</strong>
365 var absUrl = $.mobile.path.makeUrlAbsolute("file.html", "http://foo.com/a/b/c/test.html");
366
367 <strong>// Returns: http://foo.com/a/foo/file.html</strong>
368 var absUrl = $.mobile.path.makeUrlAbsolute("../../foo/file.html", "http://foo.com/a/b/c/test.html");
369
370 <strong>// Returns: http://foo.com/bar/file.html</strong>
371 var absUrl = $.mobile.path.makeUrlAbsolute("//foo.com/bar/file.html", "http://foo.com/a/b/c/test.html");
372
373 <strong>// Returns: http://foo.com/a/b/c/test.html?a=1&amp;b=2</strong>
374 var absUrl = $.mobile.path.makeUrlAbsolute("?a=1&amp;b=2", "http://foo.com/a/b/c/test.html");
375
376 <strong>// Returns: http://foo.com/a/b/c/test.html#bar</strong>
377 var absUrl = $.mobile.path.makeUrlAbsolute("#bar", "http://foo.com/a/b/c/test.html");
378
379                         </code>
380                         </pre>
381                         
382                         </dd>
383                         
384             
385                         <dt><code>$.mobile.path.isSameDomain</code> (<em>method</em>)</dt>
386                         <dd>Utility method for comparing the domain of 2 URLs.</dd>
387                         <dd>
388                                 
389                                 <dl>
390                                         <dt><code>&#183;</code> Arguments</dt>
391                                         <dd><code>url1</code> (<em>string</em>, required) A relative URL.</dd>  
392                                         <dd><code>url2</code> (<em>string</em>, required) An absolute URL to resolve against.</dd>      
393                                                 
394                                         <dt>Return Value</dt>
395                                         <dd>This function returns a boolean true if the domains match, false if they don't.</dd>        
396                                                 
397                                 </dl>
398                         </dd>
399                         <dd>Examples:
400                         <pre>
401                         <code>
402 <strong>// Returns: true</strong>
403 var same = $.mobile.path.isSameDomain("http://foo.com/a/file.html", "http://foo.com/a/b/c/test.html");
404
405 <strong>// Returns: false</strong>
406 var same = $.mobile.path.isSameDomain("file://foo.com/a/file.html", "http://foo.com/a/b/c/test.html");
407
408 <strong>// Returns: false</strong>
409 var same = $.mobile.path.isSameDomain("https://foo.com/a/file.html", "http://foo.com/a/b/c/test.html");
410
411 <strong>// Returns: false</strong>
412 var same = $.mobile.path.isSameDomain("http://foo.com/a/file.html", "http://bar.com/a/b/c/test.html");
413
414                         </code>
415                         </pre>
416                         
417                         </dd>
418                         
419             
420                         <dt><code>$.mobile.path.isRelativeUrl</code> (<em>method</em>)</dt>
421                         <dd>Utility method for determining if a URL is a relative variant.</dd>
422                         <dd>
423                                 
424                                 <dl>
425                                         <dt><code>&#183;</code> Arguments</dt>
426                                         <dd><code>url</code> (<em>string</em>, required) A relative or absolute URL.</dd>       
427                                                 
428                                         <dt><code>&#183;</code> Return Value</dt>
429                                         <dd>This function returns a boolean true if the URL is relative, false if it is absolute.</dd>  
430                                                 
431                                 </dl>
432                         </dd>
433                         <dd>Examples:
434                         <pre>
435                         <code>
436 <strong>// Returns: false</strong>
437 var isRel = $.mobile.path.isRelativeUrl("http://foo.com/a/file.html");
438
439 <strong>// Returns: true</strong>
440 var isRel = $.mobile.path.isRelativeUrl("//foo.com/a/file.html");
441
442 <strong>// Returns: true</strong>
443 var isRel = $.mobile.path.isRelativeUrl("/a/file.html");
444
445 <strong>// Returns: true</strong>
446 var isRel = $.mobile.path.isRelativeUrl("file.html");
447
448 <strong>// Returns: true</strong>
449 var isRel = $.mobile.path.isRelativeUrl("?a=1&amp;b=2");
450
451 <strong>// Returns: true</strong>
452 var isRel = $.mobile.path.isRelativeUrl("#foo");
453
454
455                         </code>
456                         </pre>
457                         
458                         </dd>
459                         
460             
461                         <dt><code>$.mobile.path.isAbsoluteUrl</code> (<em>method</em>)</dt>
462                         <dd>Utility method for determining if a URL is absolute.</dd>
463                         <dd>
464                                 
465                                 <dl>
466                                         <dt><code>&#183;</code> Arguments</dt>
467                                         <dd><code>url</code> (<em>string</em>, required) A relative or absolute URL.</dd>       
468                                                 
469                                         <dt><code>&#183;</code> Return Value</dt>
470                                         <dd>This function returns a boolean true if the URL is absolute, false if it is absolute.</dd>  
471                                                 
472                                 </dl>
473                         </dd>
474                         <dd>Examples:
475                         <pre>
476                         <code>
477 <strong>// Returns: true</strong>
478 var isAbs = $.mobile.path.isAbsoluteUrl("http://foo.com/a/file.html");
479
480 <strong>// Returns: false</strong>
481 var isAbs = $.mobile.path.isAbsoluteUrl("//foo.com/a/file.html");
482
483 <strong>// Returns: false</strong>
484 var isAbs = $.mobile.path.isAbsoluteUrl("/a/file.html");
485
486 <strong>// Returns: false</strong>
487 var isAbs = $.mobile.path.isAbsoluteUrl("file.html");
488
489 <strong>// Returns: false</strong>
490 var isAbs = $.mobile.path.isAbsoluteUrl("?a=1&amp;b=2");
491
492 <strong>// Returns: false</strong>
493 var isAbs = $.mobile.path.isAbsoluteUrl("#foo");
494
495
496                         </code>
497                         </pre>
498                         
499                         </dd>
500                         
501             
502                         <dt><code>$.mobile.base</code> (<em>methods, properties</em>)</dt>
503                         <dd>Utilities for working with generated base element. TODO: document as public API is finalized.</dd>
504                         
505                         
506                         
507                         <dt><code>$.mobile.silentScroll</code> (<em>method</em>)</dt>
508                         <dd>Scroll to a particular Y position without triggering scroll event listeners.</dd>
509                         <dd>
510                                 <dl>
511                                         <dt><code>&#183;</code> Arguments:</dt>
512                                         <dd><code>yPos</code> (<em>number</em>, defaults to 0). Pass any number to scroll to that Y location.</dd>
513                                 </dl>
514                         </dd>
515                         
516                         <dd>Examples:
517                         <pre>
518                         <code>
519 <strong>//scroll to Y 100px</strong>                    
520 $.mobile.silentScroll(100);     
521                         </code>
522                         </pre>
523                         
524                         </dd>
525                         
526
527                         
528                         
529                         
530                         <dt><code>$.mobile.activePage</code> (<em>property</em>)</dt>
531                         <dd>Reference to the page currently in view.</dd>
532                         
533                         
534                         
535                         
536                 </dl>                   
537         </div><!--/content-secondary -->                
538         
539         <div class="content-secondary">
540                 
541                 <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
542                         
543                                 <h3>More in this section</h3>
544                                 
545                                 <ul data-role="listview"  data-theme="c" data-dividertheme="d">
546                                 
547                                         <li data-role="list-divider">API</li>
548                                         <li><a href="../../docs/api/globalconfig.html">Configuring defaults</a></li>
549                                         <li><a href="../../docs/api/events.html">Events</a></li>
550                                         <li data-theme="a"><a href="../../docs/api/methods.html">Methods &amp; Utilities</a></li>
551                                         <li><a href="../../docs/api/data-attributes.html">Data attribute reference</a></li>
552                                         <li><a href="../../docs/api/themes.html">Theme framework</a></li>
553                                 </ul>
554                 </div>
555         </div>          
556
557 </div><!-- /content -->
558
559 <div data-role="footer" class="footer-docs" data-theme="c">
560                 <p>&copy; 2011 The jQuery Project</p>
561 </div>
562         
563 </div><!-- /page -->
564
565 </body>
566 </html>