Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
Closed
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
131cc10
Added ability to control if $.mobile will automatically load first pa…
Feb 2, 2011
6ffb003
Merge remote branch 'upstream/master'
toreym Feb 2, 2011
672df3e
Merge branch 'master' of https://github.com/jquery/jquery-mobile
toreym Feb 2, 2011
d7e2d40
When autoInitialize is false continue to call pageLoading.
toreym Feb 2, 2011
d3f2fe0
pageLoading should work without pageContainer set. Append loader to …
toreym Feb 2, 2011
db88c4f
externalize $.mobile.urlHistory.clear function
ajkovar Feb 2, 2011
49d2344
remove extra timeout
ajkovar Feb 2, 2011
a61ade5
fixed base undefined error in firefox
ajkovar Feb 2, 2011
5a92146
property should not be defined in $.mobile.
Feb 3, 2011
87b3a52
whitespace in core tests
johnbender Feb 2, 2011
ae52fe7
added autoInitialize documentation
johnbender Feb 3, 2011
5bc25f5
added step tests for keypress, removed data-step attribute check in f…
johnbender Feb 3, 2011
da96718
In android 2.1 and 1.6, the split button anchor needed to be a siblin…
Feb 3, 2011
6d23d64
added data-rel back attrs to dialog sample buttons
Feb 3, 2011
82fb3ae
Fixed broken footer example, added a few more color variations.
toddparker Feb 3, 2011
eabb937
Added firefox mobile to the list of supported browers for alpha 3.
toddparker Feb 3, 2011
5437c14
Added h2 to intro page
toddparker Feb 3, 2011
f0398de
Removie site AI, not needed in Git.
toddparker Feb 3, 2011
c0c9a05
Added new home and search icons to sprite.
toddparker Feb 3, 2011
b005ace
Added new home and search icon classes. Re-named the ui-icon-search u…
toddparker Feb 3, 2011
3977b26
Re-named the ui-icon-search used on search inputs to ui-icon-searchin…
toddparker Feb 3, 2011
6f79ddb
Created demo buttons for the new home and search icons
toddparker Feb 3, 2011
b9bc511
Updated Valencia with new icons
toddparker Feb 3, 2011
8b5ab45
Alpha 3 flag
toddparker Feb 3, 2011
81f4fcb
New high-res logo with better compression
toddparker Feb 3, 2011
25dae13
Icon source PSD
toddparker Feb 3, 2011
64281bf
Added 1px extra padding to icon only buttons. Adjusted offset for cle…
toddparker Feb 3, 2011
012fbbf
Updated sample page templates and docs to mobile a3 and jquery 1.5
toddparker Feb 3, 2011
51c7200
Removed experimental section with API browser because it's outdated
toddparker Feb 3, 2011
4091963
Upgraded YUI Compressor to 2.4.4.
jeresig Feb 3, 2011
f1078e0
Page min-height was being calculated with JS and it was far too tall.…
Feb 3, 2011
9958fb7
Added a home link to all pages and changed the header bar theme swatc…
toddparker Feb 3, 2011
6094345
Device image
toddparker Feb 3, 2011
dbfb314
typo in code example. Fixes #966
Feb 3, 2011
f484a5b
fixed a regression in some android 2.2 devices where checkboxes were …
Feb 3, 2011
54366c4
home button fixes
toddparker Feb 3, 2011
73a02b2
Added bg color for demo pages
toddparker Feb 3, 2011
c106521
Tagging the 1.0a3 release.
jeresig Feb 3, 2011
8d698ec
Make some tweaks to the deploy script.
jeresig Feb 3, 2011
0f0cc98
Added ability to control if $.mobile will automatically load first pa…
Feb 2, 2011
d8f3932
When autoInitialize is false continue to call pageLoading.
toreym Feb 2, 2011
2ae6542
pageLoading should work without pageContainer set. Append loader to …
toreym Feb 2, 2011
25c428d
Merge branch 'master' of https://github.com/jquery/jquery-mobile
toreym Feb 4, 2011
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added autoInitialize documentation
  • Loading branch information
johnbender authored and toreym committed Feb 4, 2011
commit ae52fe71af4e0aaad39062c25cc008f6c7eab717
77 changes: 40 additions & 37 deletions docs/api/globalconfig.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<!DOCTYPE html>
<html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>jQuery Mobile Docs - Configuring default settings</title>
<link rel="stylesheet" href="../../themes/default/" />
<meta charset="utf-8" />
<title>jQuery Mobile Docs - Configuring default settings</title>
<link rel="stylesheet" href="../../themes/default/" />
<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
<script type="text/javascript" src="../../js/jquery.js"></script>
<script type="text/javascript" src="../../js/"></script>
</head>
<body>
</head>
<body>

<div data-role="page">

Expand All @@ -19,18 +19,18 @@ <h1>Configuring Defaults</h1>
<div data-role="content" data-theme="c">
<h2>Working with jQuery Mobile's Auto-initialization</h2>
<p>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.</p>

<h3>The mobileinit event</h3>
<p>When the jQuery Mobile starts to execute, it triggers a <code>mobileinit</code> event on the <code>document</code> object, to which you can bind to apply overrides to jQuery Mobile's defaults.</p>

<pre>
<code>
$(document).bind("mobileinit", function(){
//apply overrides here
});
</code>
</pre>

<p>Because the <code>mobileinit</code> 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:</p>

<pre>
Expand All @@ -39,10 +39,10 @@ <h3>The mobileinit event</h3>
<strong>&lt;script src=&quot;custom-scripting.js&quot;&gt;&lt;/script&gt;</strong>
&lt;script src=&quot;jquery-mobile.js&quot;&gt;&lt;/script&gt;
</code>
</pre>
</pre>

<p>Within this event binding, you can configure defaults either by extending the <code>$.mobile</code> object using jQuery's <code>$.extend</code> method:</p>

<pre>
<code>
$(document).bind("mobileinit", function(){
Expand All @@ -52,7 +52,7 @@ <h3>The mobileinit event</h3>
});
</code>
</pre>

<p>...or by setting them individually:</p>
<pre>
<code>
Expand All @@ -61,53 +61,56 @@ <h3>The mobileinit event</h3>
});
</code>
</pre>


<h2>Configurable options</h2>
<p>The following defaults are configurable via the <code>$.mobile</code> object:</p>

<dl>
<dt>subPageUrlKey (<em>string</em>, default: "ui-page"):</dt>
<dd>The url parameter used for referencing widget-generated sub-pages (such as those generated by nested listviews). Translates to to <em>example.html<strong>&ui-page=</strong>subpageIdentifier</em>. The hash segment before &ui-page= is used by the framework for making an Ajax request to the URL where the sub-page exists.</dd>

<dt>nonHistorySelectors (<em>string</em>, default: "dialog"):</dt>
<dd>Anchor links with a data-rel attribute value, or pages with a data-role value, that match these selectors will not be trackable in history (they won't update the location.hash and won't be bookmarkable).</dd>
<dt>activePageClass (<em>string</em>, default: "ui-page-active"):</dt>


<dt>activePageClass (<em>string</em>, default: "ui-page-active"):</dt>
<dd>The class assigned to page currently in view, and during transitions</dd>
<dt>activeBtnClass (<em>string</em>, default: "ui-page-active"):</dt>


<dt>activeBtnClass (<em>string</em>, default: "ui-page-active"):</dt>
<dd>The class used for "active" button state, from CSS framework.</dd>
<dt>ajaxEnabled (<em>boolean</em>, default: true):</dt>

<dt>ajaxEnabled (<em>boolean</em>, default: true):</dt>
<dd>jQuery Mobile will automatically handle link clicks and form submissions through Ajax, when possible. If false, url hash listening will be disabled as well, and urls will load as regular http requests.</dd>

<dt>ajaxLinksEnabled (<strong>deprecated</strong> <em>boolean</em>, default: true):</dt>
<dt>ajaxLinksEnabled (<strong>deprecated</strong> <em>boolean</em>, default: true):</dt>
<dd>jQuery Mobile will automatically handle link clicks through Ajax, when possible.</dd>

<dt>ajaxFormsEnabled (<strong>deprecated</strong> <em>boolean</em>, default: true):</dt>
<dt>ajaxFormsEnabled (<strong>deprecated</strong> <em>boolean</em>, default: true):</dt>
<dd>jQuery Mobile will automatically handle form submissions through Ajax, when possible.</dd>

<dt>defaultTransition (<em>string</em>, default: 'slide'):</dt>
<dt>autoInitialize (<em>boolean</em>, default: true):</dt>
<dd>Auto initialize, when set to false, will defer the enhancement of your embeded pages until <pre><code> $.mobile.initializePage(); </code></pre> is invoked explicitly. By default the page is enhanced when the dom is ready.</dd>

<dt>defaultTransition (<em>string</em>, default: 'slide'):</dt>
<dd>Set the default transition for page changes that use Ajax. Set to 'none' for no transitions by default.</dd>
<dt>loadingMessage (<em>string</em>, default: "loading"):</dt>

<dt>loadingMessage (<em>string</em>, default: "loading"):</dt>
<dd>Set the text that appears when a page is loading. If set to false, the message will not appear at all.</dd>
<dt>metaViewportContent (<em>string</em>, default: "width=device-width, minimum-scale=1, maximum-scale=1"):</dt>

<dt>metaViewportContent (<em>string</em>, default: "width=device-width, minimum-scale=1, maximum-scale=1"):</dt>
<dd>Configure the auto-generated meta viewport tag's content attribute. If false, no meta tag will be appended to the DOM.</dd>

<dt>gradeA (<em>function that returns a boolean</em>, default: a function returning the value of $.support.mediaquery):</dt>
<dt>gradeA (<em>function that returns a boolean</em>, default: a function returning the value of $.support.mediaquery):</dt>
<dd>Any support conditions that must be met in order to proceed.</dd>


</dl>


</div><!-- /content -->
</div><!-- /page -->

</body>
</html>
</html>