mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-26 09:04:43 +00:00
documented the new jqmData method and :jqmData selector.
This commit is contained in:
parent
9fc1f9828b
commit
8a3b846e95
1 changed files with 15 additions and 0 deletions
|
|
@ -68,6 +68,21 @@ $.mobile.changePage("../alerts/confirm.html", "pop", false, false);
|
|||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt><code>jqmData()</code> (<em>method</em>)</dt>
|
||||
<dd>When working with jQuery Mobile, <code>jqmData</code> should be used in place of jQuery core's <code>data</code> method, as it automatically incorporates getting and setting of namespaced data attributes (even if no namespace is currently in use).</dd>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt>Arguments:</dt>
|
||||
<dd>See jQuery's data method: http://api.jquery.com/jQuery.data/</dd>
|
||||
<dt>Also:</dt>
|
||||
<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>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><code>$.mobile.pageLoading</code> (<em>method</em>)</dt>
|
||||
<dd>Show or hide the page loading message, which is configurable via $.mobile.loadingMessage.</dd>
|
||||
<dd>
|
||||
|
|
|
|||
Loading…
Reference in a new issue