Skip to content
Browse files

added docs on data-ajax=false helper $.fn.jqmHijackable for solution to

  • Loading branch information...
1 parent 46e2687 commit acee1cdab2870b5ed0252dd1ce485f443383e4b6 @johnbender johnbender committed Feb 22, 2012
Showing with 20 additions and 11 deletions.
  1. +20 −11 docs/api/methods.html
View
31 docs/api/methods.html
@@ -145,9 +145,22 @@
});
</code>
</pre>
-
+
+ </dd>
+
+ <dt><code>$.fn.jqmData(), $.fn.jqmRemoveData()</code> (<em>method</em>)</dt>
+ <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>
+ <dd>
+ <dl>
+ <dt><code>&#183;</code> Arguments:</dt>
+ <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>
+ <strong>Note: </strong>Calling jqmData() with no argument will return <code>undefined</code>. This behavior is subject to change in future versions.
+ <dt><code>&#183;</code> 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>$.fn.jqmEnhanceable()</code> (<em>method</em>)</dt>
<dd>For users wishing to respect <code>data-enhance=false</code> parent elements during manual enhancement or custom plugin authoring jQuery Mobile provdes the <code>$.fn.jqmEnhanceable</code> filter method.</dd>
<dd>
@@ -159,21 +172,17 @@
</dl>
</dd>
- <dt><code>$.fn.jqmData(), $.fn.jqmRemoveData()</code> (<em>method</em>)</dt>
- <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>
+ <dt><code>$.fn.jqmHijackable()</code> (<em>method</em>)</dt>
+ <dd>For users wishing to respect <code>data-ajax=false</code> parent elements during custom form and link binding jQuery Mobile provdes the <code>$.fn.jqmHijackable</code> filter method.</dd>
<dd>
<dl>
- <dt><code>&#183;</code> Arguments:</dt>
- <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>
- <strong>Note: </strong>Calling jqmData() with no argument will return <code>undefined</code>. This behavior is subject to change in future versions.
- <dt><code>&#183;</code> 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>
+ <dt><code>&#183;</code> Settings:</dt>
+ <dd>When <code>$.mobile.ignoreContentEnabled</code> is set to true, this method will traverse the parent nodes for each DOM element in the jQuery object and where it finds a <code>data-ajax=false</code> parent the child form or link will be removed from the set.</dd>
+ <dt><code>&#183;</code> Warning:</dt>
+ <dd>The operation of traversing all parent elements can be expensive for even small jQuery object sets.</dd>
</dl>
</dd>
-
-
-
<dt><code>$.mobile.showPageLoadingMsg</code> (<em>method</em>)</dt>
<dd>Show the page loading message, which is configurable via $.mobile.loadingMessage.</dd>
<dd>

0 comments on commit acee1cd

Please sign in to comment.
Something went wrong with that request. Please try again.