diff --git a/docs/events.html b/docs/api/events.html similarity index 82% rename from docs/events.html rename to docs/api/events.html index 3178e03d..5eee8f19 100755 --- a/docs/events.html +++ b/docs/api/events.html @@ -3,8 +3,8 @@
Note that by binding to pagebeforecreate and returning false, you can prevent the page plugin from making its manipulations.
Note on Page IDs: Page elements in jQuery Mobile utilize the ID attribute for storing the location from which they came. When you place an ID attribute on a page that is brought into jQuery Mobile's single-page environment through Ajax, jQuery Mobile wraps that page with a new "page" div element, preserving any CSS references to your ID. However, this means that your ID attribute is no longer on the "page" element, so you must keep this in mind when binding to page events (pagebeforecreate, pagecreate, etc). To avoid issues, try using a class if possible.
Currently, jQuery Mobile exposes the animationComplete event, which you can utilize after adding or removing a class that applies a CSS transition.
jQuery Mobile exposes the animationComplete plugin, which you can utilize after adding or removing a class that applies a CSS transition.
The following defaults are configurable via the $.mobile object:
Visit the Configuring Default Settings page for instructions on configuring these properties.
+ +Unlike other jQuery projects, such as jQuery and jQuery UI, jQuery Mobile automatically applies many markup enhancements as soon as it loads (long before document.ready event fires). These enhancements are applied based on jQuery Mobile's default configuration, which is designed to work with common scenarios, but may or may not match your particular needs. Fortunately, these settings are easy to configure.
+ +When the jQuery Mobile starts to execute, it triggers a mobileinit event on the document object, to which you can bind to apply overrides to jQuery Mobile's defaults.
+
+$(document).bind("mobileinit", function(){
+ //apply overrides here
+});
+
+
+
+ Because the mobileinit event is triggered immediately upon execution, you'll need to bind your event handler before jQuery Mobile is loaded. Thus, we recommend linking to your JavaScript files in the following order:
+
+<script src="jquery.js"></script>
+<script src="custom-scripting.js"></script>
+<script src="jquery-mobile.js"></script>
+
+
+
+ Within this event binding, you can configure defaults either by extending the $.mobile object using jQuery's $.extend method:
+
+$(document).bind("mobileinit", function(){
+ $.extend( $.mobile , {
+ foo: bar
+ });
+});
+
+
+
+ ...or by setting them individually:
+
+
+$(document).live("mobileinit", function(){
+ $.mobile.foo = bar;
+});
+
+
+
+ Visit the Configurable Default Settings page for information on the configurable defaults.
+ +