diff --git a/docs/_assets/css/jqm-docs.css b/docs/_assets/css/jqm-docs.css index 0f53fb3e9d8..d103b98dbf5 100644 --- a/docs/_assets/css/jqm-docs.css +++ b/docs/_assets/css/jqm-docs.css @@ -1,7 +1,7 @@ /* jqm docs css -Beware: lots of last-minute CSS going on in here -cobblers, shoes, +Beware: lots of last-minute CSS going on in here +cobblers, shoes, */ body { background: #dddddd; } @@ -14,7 +14,7 @@ body { background: #dddddd; } .ui-mobile .jqm-themeswitcher { margin: 10px 25px 10px 10px; } h2 { margin:1.2em 0 .4em 0; } -p code { font-size:1.2em; font-weight:bold; } +p code { font-size:1.2em; font-weight:bold; } dt { font-weight: bold; margin: 2em 0 .5em; } dt code, dd code { font-size:1.3em; line-height:150%; } @@ -77,36 +77,36 @@ p.intro strong { /* new API additions */ -dt { - margin: 35px 0 15px 0; - background-color:#ddd; +dt { + margin: 35px 0 15px 0; + background-color:#ddd; font-weight:normal; } -dt code { - display:inline-block; +dt code { + display:inline-block; font-weight:bold; - color:#56A00E; - padding:3px 7px; - margin-right:10px; - background-color:#fff; + color:#56A00E; + padding:3px 7px; + margin-right:10px; + background-color:#fff; } -dd { - margin-bottom:10px; +dd { + margin-bottom:10px; } dd .default { font-weight:bold; } -dd pre { - margin:0 0 0 0; +dd pre { + margin:0 0 0 0; } dd code { font-weight: normal; } -dd pre code { - margin:0; - border:none; - font-weight:normal; - font-size:100%; - background-color:transparent; +dd pre code { + margin:0; + border:none; + font-weight:normal; + font-size:100%; + background-color:transparent; } dd h4 { margin:15px 0 0 0; } - + .localnav { margin:0 0 20px 0; overflow:hidden; @@ -114,9 +114,9 @@ dd h4 { margin:15px 0 0 0; } .localnav li { float:left; } -.localnav .ui-btn-inner { - padding: .6em 10px; - font-size:80%; +.localnav .ui-btn-inner { + padding: .6em 10px; + font-size:80%; } @@ -126,13 +126,13 @@ dd h4 { margin:15px 0 0 0; } background: #74b042; color: #fff; font-weight: bold; - text-shadow: 0 -1px 1px #234403; + text-shadow: 0 -1px 1px #234403; background-image: -webkit-gradient(linear, left top, left bottom, from(#74b042), to(#56A00E)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(top, #74b042, #56A00E); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(top, #74b042, #56A00E); /* FF3.6 */ background-image: -ms-linear-gradient(top, #74b042, #56A00E); /* IE10 */ background-image: -o-linear-gradient(top, #74b042, #56A00E); /* Opera 11.10+ */ - background-image: linear-gradient(top, #74b042, #56A00E); + background-image: linear-gradient(top, #74b042, #56A00E); } .ui-bar-f, .ui-bar-f .ui-link-inherit { @@ -149,7 +149,7 @@ dd h4 { margin:15px 0 0 0; } /* docs site layout */ @media all and (min-width: 650px){ - + .jqm-home { position: absolute; left: 10px; @@ -237,7 +237,7 @@ dd h4 { margin:15px 0 0 0; } margin: 0; padding: 0; } - + } @media all and (min-width: 750px){ .type-home .ui-content, @@ -250,7 +250,7 @@ dd h4 { margin:15px 0 0 0; } .content-primary { width: 56%; padding-right: 1%; - } + } .type-interior .ui-content { background-position: 34%; } diff --git a/docs/_assets/js/_viewsource.js b/docs/_assets/js/_viewsource.js index 32b53e7bcbb..14880e0df32 100644 --- a/docs/_assets/js/_viewsource.js +++ b/docs/_assets/js/_viewsource.js @@ -13,7 +13,7 @@ $.fn.addSourceLink = function(style){ "" ) .appendTo( "body" ) .page(); - + $('View Source') .buttonMarkup({ icon: 'arrow-u', @@ -30,10 +30,10 @@ $.fn.addSourceLink = function(style){ page.find('.ui-btn-left').click(function(){ $.changePage(activepage, 'slideup',true); return false; - }); - }) + }); + }) .insertAfter(this); - }); + }); }; //set up view source links diff --git a/docs/_assets/js/jqm-docs.js b/docs/_assets/js/jqm-docs.js index ffe9526622d..52ba601d3eb 100644 --- a/docs/_assets/js/jqm-docs.js +++ b/docs/_assets/js/jqm-docs.js @@ -1,16 +1,16 @@ //set up the theme switcher on the homepage $('div').live('pagecreate',function(event){ - if( !$(this).is('.ui-dialog')){ + if( !$(this).is('.ui-dialog')){ var appendEl = $(this).find('.ui-footer:last'); - + if( !appendEl.length ){ appendEl = $(this).find('.ui-content'); } - + if( appendEl.is("[data-position]") ){ return; } - + $('Switch theme') .buttonMarkup({ 'icon':'gear', @@ -23,7 +23,7 @@ $('div').live('pagecreate',function(event){ .bind( "vclick", function(){ $.themeswitcher(); }); - } + } }); @@ -37,7 +37,7 @@ $(function(){ function setDefaultTransition(){ var winwidth = $( window ).width(), trans ="slide"; - + if( winwidth >= 1000 ){ trans = "none"; } diff --git a/docs/about/accessibility.html b/docs/about/accessibility.html index 90dbd3e1d53..752d387d3c4 100755 --- a/docs/about/accessibility.html +++ b/docs/about/accessibility.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Accessibility - + + jQuery Mobile Docs - Accessibility + - - + +
@@ -21,19 +21,19 @@

Accessibility

- - + +
- +

Accessibility

-

jQuery Mobile is built upon standard, semantic HTML, allowing pages to be accessible to the broadest range of devices possible. For A-Grade browsers, many of the components in jQuery Mobile leverage techniques such as focus management, keyboard navigation, and HTML attributes specified in the W3C's WAI-ARIA specification.

- +

jQuery Mobile is built upon standard, semantic HTML, allowing pages to be accessible to the broadest range of devices possible. For A-Grade browsers, many of the components in jQuery Mobile leverage techniques such as focus management, keyboard navigation, and HTML attributes specified in the W3C's WAI-ARIA specification.

+

By utilizing these techniques, we do our best to ensure an accessible experience to users with disabilities such as blindness, who may use screen readers (like VoiceOver, on Apple's iPhone device) or other assistive technology to access the web.

- +

While our accessibility implementation is currently a work in progress, we aim to provide a fully accessible suite of components for version 1.0.

- -
- + +
+
@@ -47,11 +47,11 @@

More in this section

  • Accessibility
  • Supported platforms
  • - +
    - + @@ -59,10 +59,10 @@

    More in this section

    © 2011 The jQuery Project

    - + - + diff --git a/docs/about/features.html b/docs/about/features.html index 11072f560c2..e643023806b 100755 --- a/docs/about/features.html +++ b/docs/about/features.html @@ -1,29 +1,29 @@ - - + + - - jQuery Mobile Docs - Features - + + jQuery Mobile Docs - Features + - - + + -
    +
    -

    Features

    +

    Features

    Home
    - +
    - +

    Key features:

    • Built on jQuery core for familiar and consistent jQuery syntax and minimal learning curve
    • @@ -40,7 +40,7 @@

      Key features:

    - +
    @@ -56,16 +56,16 @@

    More in this section

    -
    +
    +
    + - diff --git a/docs/about/index.html b/docs/about/index.html index 395bac8cc3d..b3beb734228 100755 --- a/docs/about/index.html +++ b/docs/about/index.html @@ -10,8 +10,8 @@ - - + +
    @@ -21,7 +21,7 @@

    About jQuery Mobile

    - +
    - + - - + + + diff --git a/docs/about/platforms.html b/docs/about/platforms.html index b37177a5647..36c35035bee 100755 --- a/docs/about/platforms.html +++ b/docs/about/platforms.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Supported platforms - + + jQuery Mobile Docs - Supported platforms + - - + +
    @@ -21,8 +21,8 @@

    Supported platforms

    - - + +

    Platform support in Beta 3

    As of Beta 3, we've pretty much covered our target platforms for 1.0. At this stage, jQuery Mobile works on the vast majority of all modern desktop, smartphone, tablet, and e-reader platforms. In addition, feature phones and older browsers are also supported because of our progressive enhancement approach. We're very proud of our commitment to universal accessibility through our broad support for all popular platforms.

    @@ -66,9 +66,9 @@

  • Samsung Bada - The project doesn't currently have test devices or emulators, but current support is known to be fairly good. Support level undecided for 1.0.
  • - - - + + +

    @@ -84,18 +84,18 @@

    More in this section

  • Accessibility
  • Supported platforms
  • - +
    -
    + - - + + + diff --git a/docs/api/globalconfig.html b/docs/api/globalconfig.html index 88d76243b67..62d16f2e599 100755 --- a/docs/api/globalconfig.html +++ b/docs/api/globalconfig.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Configuring default settings - + + jQuery Mobile Docs - Configuring default settings + - - + +
    @@ -22,13 +22,13 @@

    Configuring Defaults

    - +

    Working with jQuery Mobile's Auto-initialization

    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.

    - +

    The mobileinit event

    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(){
    @@ -36,7 +36,7 @@ 

    The mobileinit event

    });
    - +

    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:

    @@ -45,10 +45,10 @@ 

    The mobileinit event

    <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(){
    @@ -58,7 +58,7 @@ 

    The mobileinit event

    });
    - +

    ...or by setting them individually:

     				
    @@ -67,13 +67,13 @@ 

    The mobileinit event

    });
    - - + +

    Configurable options

    The following defaults are configurable via the $.mobile object:

    - +
    -
    ns string, default: ""
    +
    ns string, default: ""
    The namespace used in data- attributes, for example, data-role. Can be set to anything, including a blank string which is the default. When using, it's clearest if you include a trailing dash, such as "mynamespace-" which maps to data-mynamespace-foo="...".

    NOTE: if you're using data- namespacing, you'll need to manually update/override one selector in the theme CSS. The following data selectors should incorporate the namespace you're using:

    
    @@ -81,76 +81,76 @@ 

    Configurable options

    - -
    autoInitializePage boolean, default: true
    + +
    autoInitializePage boolean, default: true
    When the DOM is ready, the framework should automatically call $.mobile.initializePage. If false, page will not initialize, and will be visually hidden until until $.mobile.initializePage is manually called.
    - +
    subPageUrlKey string, default: "ui-page"
    The url parameter used for referencing widget-generated sub-pages (such as those generated by nested listviews). Translates to to example.html&ui-page=subpageIdentifier. The hash segment before &ui-page= is used by the framework for making an Ajax request to the URL where the sub-page exists.
    - -
    activePageClass string, default: "ui-page-active"
    + +
    activePageClass string, default: "ui-page-active"
    The class assigned to page currently in view, and during transitions
    - - -
    activeBtnClass string, default: "ui-btn-active"
    + + +
    activeBtnClass string, default: "ui-btn-active"
    The class used for "active" button state, from CSS framework.
    - -
    ajaxEnabled boolean, default: true
    + +
    ajaxEnabled boolean, default: true
    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.
    -
    hashListeningEnabled boolean, default: true
    +
    hashListeningEnabled boolean, default: true
    jQuery Mobile will automatically listen and handle changes to the location.hash. Disabling this will prevent jQuery Mobile from handling hash changes, which allows you to handle them yourself, or simply to use simple deep-links within a document that scroll to a particular ID.
    -
    defaultPageTransition string, default: 'slide'
    +
    defaultPageTransition string, default: 'slide'
    Set the default transition for page changes that use Ajax. Set to 'none' for no transitions by default.
    - -
    touchOverflowEnabled boolean, default: false
    + +
    touchOverflowEnabled boolean, default: false
    Enable pages to have self-contained native scrolling and fixed toolbars in devices that support the overflow-scrolling: touch; property.
    - -
    defaultDialogTransition string, default: 'pop'
    + +
    defaultDialogTransition string, default: 'pop'
    Set the default transition for dialog changes that use Ajax. Set to 'none' for no transitions by default.
    -
    minScrollBack string, default: 150
    +
    minScrollBack string, default: 150
    Minimum scroll distance that will be remembered when returning to a page.
    - -
    loadingMessage string, default: "loading"
    + +
    loadingMessage string, default: "loading"
    Set the text that appears when a page is loading. If set to false, the message will not appear at all.
    - -
    pageLoadErrorMessage string, default: "Error Loading Page"
    + +
    pageLoadErrorMessage string, default: "Error Loading Page"
    Set the text that appears when a page fails to load through Ajax.
    -
    gradeA function that returns a boolean, default: a function returning the value of $.support.mediaquery
    +
    gradeA function that returns a boolean, default: a function returning the value of $.support.mediaquery
    Any support conditions that must be met in order to proceed.
    -
    - +
    +
    - +
    - +

    More in this section

    - +
    -
    +
    - + diff --git a/docs/api/index.html b/docs/api/index.html index f9175619d72..3f61c02e812 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -10,8 +10,8 @@ - - + +
    @@ -20,14 +20,14 @@

    API

    - - + + diff --git a/docs/api/mediahelpers.html b/docs/api/mediahelpers.html index e2313ea832e..3d44ef20fbe 100755 --- a/docs/api/mediahelpers.html +++ b/docs/api/mediahelpers.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Responsive Layout Helpers - + + jQuery Mobile Docs - Responsive Layout Helpers + - - + +
    @@ -21,12 +21,12 @@

    Responsive Layout Helpers

    - +

    Media Query Helper Classes

    Note: This feature is deprecated in beta, and will be removed after that. We recommend using CSS3 Media Queries instead.

    jQuery Mobile adds classes to the HTML element that mimic browser orientation and common min/max-width CSS media queries. These classes are updated on load, resize and orientationchange, allowing you to key off these classes in your CSS, to create responsive layouts - even in browsers that don't support media queries!

    - +

    Orientation Classes

    The HTML element will always have a class of either "portrait" or "landscape", depending on the orientation of the browser or device. You can utilize these in your CSS like this:

    @@ -37,47 +37,47 @@

    Orientation Classes

    } .landscape { /* landscape orientation changes go here! */ -} +} - +

    Min/Max Width Breakpoint Classes

    By default, we create min and max breakpoint classes at the following widths: 320,480,768,1024. These translate to classes that look like this: "min-width-320px", "max-width-480px", and are meant to be used as a replacement of (or in addition to) the media query equivalents they mimic.

     			
    -.myelement { 
    +.myelement {
     	float: none;
    -}			
    +}
     .min-width-480px .myelement {
     	float: left;
    -}		
    +}
     			
    -
    - + +

    Many plugins in jQuery Mobile leverage these width breakpoints. For example, form elements float beside their labels when the browser is wider than 480 pixels. The CSS to support this behavior for form text inputs looks like this:

    - +
     			
    -label.ui-input-text { 
    -	display: block; 
    +label.ui-input-text {
    +	display: block;
     }
    -.min-width-480px label.ui-input-text { 
    -	display: inline-block; 
    +.min-width-480px label.ui-input-text {
    +	display: inline-block;
     }
     			
    -
    +

    Adding Width Breakpoints

    To utilize width breakpoints of your own, jQuery Mobile exposes the $.mobile.addResolutionBreakpoints function, which accepts either a single number or array of numbers that will be added to the min/max breakpoints whenever they apply.

     			
    -//add a min/max class for 1200 pixel widths			
    +//add a min/max class for 1200 pixel widths
     $.mobile.addResolutionBreakpoints(1200);
     
    -//add min/max classes for 1200, and 1440 pixel widths			
    +//add min/max classes for 1200, and 1440 pixel widths
     $.mobile.addResolutionBreakpoints([1200, 1440]);
     			
    -
    +

    Running Media Queries

    jQuery Mobile provides a function that allows you to test whether a particular CSS Media Query applies. Simple call $.mobile.media() and pass a media type or query. If the browser supports that type or query, and it currently applies, the function will return true. If not, it'll return false.

    @@ -95,33 +95,33 @@

    Running Media Queries

    - -
    - + +
    + +
    - + diff --git a/docs/api/methods.html b/docs/api/methods.html index 0d42135bb49..5336e09c07f 100755 --- a/docs/api/methods.html +++ b/docs/api/methods.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Methods - + + jQuery Mobile Docs - Methods + - - + +
    @@ -24,14 +24,14 @@

    Methods

    jQuery Mobile exposes several methods and properties on the $.mobile object for use in your applications.

    - +
    $.mobile.changePage (method)
    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.
    - +
    - +
    · Arguments
    to (string or object, required) @@ -39,8 +39,8 @@

    Methods

  • String: Absolute or relative URL. ("about/us.html")
  • Object: jQuery collection object. ($("#about"))
  • -
    - +
    +
    options (object, optional)
    • Properties: @@ -50,7 +50,7 @@

      Methods

    • changeHash (boolean, default: true) Decides if the hash in the location bar should be updated.
    • role (string, 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.
    • pageContainer (jQuery collection, default: $.mobile.pageContainer) Specifies the element that should contain the page.
    • -
    • type (string, default: "get") Specifies the method ("get" or "post") to use when making a page request. +
    • type (string, default: "get") Specifies the method ("get" or "post") to use when making a page request.
      • Used only when the 'to' argument of changePage() is a URL.
      @@ -68,52 +68,52 @@

      Methods

    -
    +
    - +
    Examples:
     			
    -//transition to the "about us" page with a slideup transition 			
    -$.mobile.changePage( "about/us.html", { transition: "slideup"} );	
    +//transition to the "about us" page with a slideup transition
    +$.mobile.changePage( "about/us.html", { transition: "slideup"} );
     
    -//transition to the "search results" page, using data from a form with an ID of "search"" 		
    +//transition to the "search results" page, using data from a form with an ID of "search"" 	
     $.mobile.changePage( "searchresults.php", {
    -	type: "post", 
    +	type: "post",
     	data: $("form#search").serialize()
    -});		
    +});
     
    -//transition to the "confirm" page with a "pop" transition without tracking it in history			
    +//transition to the "confirm" page with a "pop" transition without tracking it in history	
     $.mobile.changePage( "../alerts/confirm.html", {
     	transition: "pop",
     	reverse: false,
     	changeHash: false
    -});	
    -		
    +});
    +
     			
     			
    - +
    - - + +
    $.mobile.loadPage (method)
    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.
    - +
    - +
    · Arguments
    -
    url (string or object, required) A relative or absolute URL.
    - +
    url (string or object, required) A relative or absolute URL.
    +
    options (object, optional)
    • Properties:
      • role (string, 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.
      • pageContainer (jQuery collection, default: $.mobile.pageContainer) Specifies the element that should contain the page after it is loaded.
      • -
      • type (string, default: "get") Specifies the method ("get" or "post") to use when making a page request. +
      • type (string, default: "get") Specifies the method ("get" or "post") to use when making a page request.
      • data (object or string, default: undefined) The data to send with an Ajax page request.
      • reloadPage (boolean, default: false) Forces a reload of a page, even if it is already in the DOM of the page container.
      • @@ -122,28 +122,28 @@

        Methods

    -
    +
    - +
    Examples:
     			
    -//load the "about us" page into the DOM			
    -$.mobile.loadPage( "about/us.html" );	
    +//load the "about us" page into the DOM
    +$.mobile.loadPage( "about/us.html" );
     
    -//load a "search results" page, using data from a form with an ID of "search"" 		
    +//load a "search results" page, using data from a form with an ID of "search"" 	
     $.mobile.loadPage( "searchresults.php", {
    -	type: "post", 
    +	type: "post",
     	data: $("form#search").serialize()
    -});				
    +});
     			
     			
    - +
    - - + +
    jqmData(), jqmRemoveData() (method)
    When working with jQuery Mobile, jqmData and jqmRemoveData should be used in place of jQuery core's data and removeData 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).
    @@ -156,52 +156,52 @@

    Methods

    - - - + + +
    $.mobile.showPageLoadingMsg ()
    Show the page loading message, which is configurable via $.mobile.loadingMessage.
    - +
    Example:
     			
    -//cue the page loader 			
    -$.mobile.showPageLoadingMsg();	
    +//cue the page loader
    +$.mobile.showPageLoadingMsg();
     			
     			
    - +
    - - - + + +
    $.mobile.hidePageLoadingMsg ()
    Hide the page loading message, which is configurable via $.mobile.loadingMessage.
    - +
    Example:
     			
    -//cue the page loader 			
    -$.mobile.hidePageLoadingMsg();	
    +//cue the page loader
    +$.mobile.hidePageLoadingMsg();
     			
     			
    - +
    - - + +
    $.mobile.path.parseUrl (method)
    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.
    - +
    - +
    · Arguments
    -
    url (string, required) A relative or absolute URL.
    - +
    url (string, required) A relative or absolute URL.
    +
    · Return Value

    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:

    -
    +
    hash
    The fragment conponent of the URL, including the leading '#' character.
    host
    @@ -218,31 +218,31 @@

    Methods

    The protocol for the URL including the trailing ':' character.
    search</dt>
    The query component of the URL including the leading '?' character.
    -
    +

    But it also contains additional properties that provide access to additional components as well as some common forms of the URL developers access:

    -
    -
    authority
    -
    The username, password, and host components of the URL
    +
    +
    authority
    +
    The username, password, and host components of the URL
    directory
    -
    The directory component of the pathname, minus any filename.
    -
    domain
    -
    The protocol and authority components of the URL.
    -
    filename
    -
    The filename within the pathname component, minus the directory.
    -
    hrefNoHash
    -
    The original URL minus the fragment (hash) components.
    -
    hrefNoSearch
    -
    The original URL minus the query (search) and fragment (hash) components.
    -
    password
    -
    The password contained within the authority component.
    -
    username
    -
    The username contained within the authority component.
    -
    -
    - +
    The directory component of the pathname, minus any filename.
    +
    domain
    +
    The protocol and authority components of the URL.
    +
    filename
    +
    The filename within the pathname component, minus the directory.
    +
    hrefNoHash
    +
    The original URL minus the fragment (hash) components.
    +
    hrefNoSearch
    +
    The original URL minus the query (search) and fragment (hash) components.
    +
    password
    +
    The password contained within the authority component.
    +
    username
    +
    The username contained within the authority component.
    +
    +
    + - +
    Examples:
     			
    @@ -269,21 +269,21 @@ 

    Methods

    var obj = $.mobile.path.parseUrl("http://jblas:password@mycompany.com:8080/mail/inbox?msg=1234");
    - +
    - - + +
    $.mobile.path.makePathAbsolute (method)
    Utility method for converting a relative file or directory path into an absolute path.
    · Arguments
    -
    relPath (string, required) A relative file or directory path.
    -
    absPath (string, required) An absolute file or relative path to resolve against.
    - +
    relPath (string, required) A relative file or directory path.
    +
    absPath (string, required) An absolute file or relative path to resolve against.
    +
    · Return Value
    -
    This function returns a string that is an absolute version of the relative path passed in.
    - +
    This function returns a string that is an absolute version of the relative path passed in.
    +
    Examples: @@ -298,20 +298,20 @@

    Methods

    - - + +
    $.mobile.path.makeUrlAbsolute (method)
    Utility method for converting a relative URL to an absolute URL.
    - +
    Arguments
    -
    relUrl (string, required) A relative URL.
    -
    absUrl (string, required) An absolute URL to resolve against.
    - +
    relUrl (string, required) A relative URL.
    +
    absUrl (string, required) An absolute URL to resolve against.
    +
    Return Value
    -
    This function returns a string that is an absolute version of the relative URL passed in.
    - +
    This function returns a string that is an absolute version of the relative URL passed in.
    +
    Examples: @@ -334,22 +334,22 @@

    Methods

    - +
    - - + +
    $.mobile.path.isSameDomain (method)
    Utility method for comparing the domain of 2 URLs.
    - +
    · Arguments
    -
    url1 (string, required) A relative URL.
    -
    url2 (string, required) An absolute URL to resolve against.
    - +
    url1 (string, required) A relative URL.
    +
    url2 (string, required) An absolute URL to resolve against.
    +
    Return Value
    -
    This function returns a boolean true if the domains match, false if they don't.
    - +
    This function returns a boolean true if the domains match, false if they don't.
    +
    Examples: @@ -369,21 +369,21 @@

    Methods

    - +
    - - + +
    $.mobile.path.isRelativeUrl (method)
    Utility method for determining if a URL is a relative variant.
    - +
    · Arguments
    -
    url (string, required) A relative or absolute URL.
    - +
    url (string, required) A relative or absolute URL.
    +
    · Return Value
    -
    This function returns a boolean true if the URL is relative, false if it is absolute.
    - +
    This function returns a boolean true if the URL is relative, false if it is absolute.
    +
    Examples: @@ -410,21 +410,21 @@

    Methods

    - +
    - - + +
    $.mobile.path.isAbsoluteUrl (method)
    Utility method for determining if a URL is absolute.
    - +
    · Arguments
    -
    url (string, required) A relative or absolute URL.
    - +
    url (string, required) A relative or absolute URL.
    +
    · Return Value
    -
    This function returns a boolean true if the URL is absolute, false if it is absolute.
    - +
    This function returns a boolean true if the URL is absolute, false if it is absolute.
    +
    Examples: @@ -451,15 +451,15 @@

    Methods

    - +
    - - + +
    $.mobile.base (methods, properties)
    Utilities for working with generated base element. TODO: document as public API is finalized.
    - - - + + +
    $.mobile.silentScroll (method)
    Scroll to a particular Y position without triggering scroll event listeners.
    @@ -468,18 +468,18 @@

    Methods

    yPos (number, defaults to 0). Pass any number to scroll to that Y location.
    - +
    Examples:
     			
    -//scroll to Y 100px 			
    -$.mobile.silentScroll(100);	
    +//scroll to Y 100px
    +$.mobile.silentScroll(100);
     			
     			
    - +
    - - + +
    $.mobile.addResolutionBreakpoints (method)
    Add width breakpoints to the min/max width classes that are added to the HTML element.
    @@ -488,54 +488,54 @@

    Methods

    values (number or array). Pass any number or array of numbers to add to the resolution classes. Read more about this feature here: Orientation & resolution targeting.
    - +
    Examples:
     			
    -//add a 400px breakpoint 			
    -$.mobile.addResolutionBreakpoints(400);	
    -//add 2 more breakpoints 			
    -$.mobile.addResolutionBreakpoints([600,800]);	
    +//add a 400px breakpoint
    +$.mobile.addResolutionBreakpoints(400);
    +//add 2 more breakpoints
    +$.mobile.addResolutionBreakpoints([600,800]);
     			
     			
    - +
    - - - + + +
    $.mobile.activePage (property)
    Reference to the page currently in view.
    - - - - - -
    - + + + + + +
    +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/api/themes.html b/docs/api/themes.html index fe6ed8daec3..433b0e387e6 100755 --- a/docs/api/themes.html +++ b/docs/api/themes.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Framework - Static Containers, States - + + jQuery Mobile Framework - Static Containers, States + - - + +
    @@ -21,35 +21,35 @@

    Themes

    - +

    Theming overview

    - -

    Every layout and widget in jQuery Mobile is designed around a new object-oriented CSS framework that makes it possible to apply a complete unified visual design Theme to sites and applications. The theming system is similar to the ThemeRoller system in jQuery UI, but adds a few important improvements:

    - - + - + - + - + - - + +

    A button is included for each swatch in the theme. Each button has styles for normal, hover/focus and pressed states.

    - +
    Button A Button B @@ -140,10 +140,10 @@

    Lists & Buttons

    Button D Button E
    - - + +

    By default, any button that's placed in a bar is automatically assigned a swatch letter that matches its parent bar or content box, to visually integrate the button into the parent theme like a chameleon, as shown here:

    - +

    Bar A

    Button A

    Bar B

    Button B
    @@ -151,11 +151,11 @@

    Lists & Buttons

    Bar D

    Button D

    Bar E

    Button E
    - +

    This default behavior makes it easy to ripple a theme change through a page by setting a theme swatch on a parent because you know the buttons will maintain the same relative visual weight across themes. Since form elements use the button styles, they will also adapt to their parent container too.

    - +

    If you want to add visual emphasis to a button and help it stand out visually from its parent toolbar, an alternate swatch color can be set by adding a data-theme="a" to the anchor. Once an alternate swatch color is set on a button in the markup, the framework won't override that color if the parent theme is changed, because you made a conscious decision to set it.

    - +
    @@ -202,14 +202,14 @@

    Lists & Buttons

    E
    - +

    Learn more about list theming and button theming.

    Global "Active" state

    The jQuery Mobile framework uses a single Theme-level swatch called "active" (bright blue in the default theme) to consistently indicate the selected state, regardless of the individual swatch of the given widget. We apply this in navigation and form controls whenever there is a need to indicate what is currently selected. Because this theme swatch is designed for clear, consistent user feedback, it cannot be overridden via the markup; it is set once in the Theme and applied by the framework whenever a selected or active state is needed. The styling for this state is in the theme stylesheet under the ui-btn-active style rules.

    - +
    Active is used for the on state of these toggles: @@ -218,13 +218,13 @@

    Global "Active" state

    - +

    Icons

    There a core set of standard icons included in the framework that can be assigned to any button. To minimize the download size of the core icons, jQuery Mobile only includes these icons in white and automatically adds a semi-transparent black circle behind the icon to make sure it has good contrast on all background colors.

    - - + +

    Learn more about theming individual components:

    -
    - +
    +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/buttons/api-buttons.html b/docs/buttons/api-buttons.html index 3d5932e8e2b..c195ea86c1c 100755 --- a/docs/buttons/api-buttons.html +++ b/docs/buttons/api-buttons.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Buttons - + + jQuery Mobile Docs - Buttons + - - + +
    @@ -21,21 +21,21 @@

    Button API

    - +

    Dependencies

    To be documented

    - +

    Options

    To be documented

    - +

    Methods

    To be documented

    - +

    Known Issues

    To be documented

    - - - + + +
    diff --git a/docs/buttons/buttons-grouped.html b/docs/buttons/buttons-grouped.html index 0f648318b39..3675687b595 100755 --- a/docs/buttons/buttons-grouped.html +++ b/docs/buttons/buttons-grouped.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Grouped Buttons - - + + jQuery Mobile Docs - Grouped Buttons + + - +
    @@ -22,7 +22,7 @@

    Grouped buttons

    - +

    Occasionally, you may want to visually group a set of buttons together to form a single block that looks contained like a navigation component. To get this effect, wrap a set of buttons in a container with the data-role="controlgroup" attribute — the framework will create a vertical button group, remove all margins and drop shadows between the buttons, and only round the first and last buttons of the set to create the effect that they are grouped together.

    
     <div data-role="controlgroup">
    @@ -33,64 +33,64 @@ 

    Grouped buttons

    By default, grouped buttons are presented as a vertical list:

    - +
    Yes No Maybe
    - +

    By adding the data-type="horizontal" attribute to the controlgroup container, you can swap to a horizontal-style group that floats the buttons side-by-side and sets the width to only be large enough to fit the content. (Be aware that these will wrap to multiple lines if the number of buttons or the overall text length is too wide for the screen.) - +

    Horizontal grouped buttons:

    Yes No Maybe
    - +

    Horizontal grouped buttons with icons:

    Up Down Delete
    - +

    Horizontal grouped buttons, icon only:

    Up Down Delete
    - - -
    - + + +
    +
    - +
    - +

    More in this section

    - +
    -
    +
    - + diff --git a/docs/buttons/buttons-icons.html b/docs/buttons/buttons-icons.html index 428a23c0dec..27b0846ea26 100755 --- a/docs/buttons/buttons-icons.html +++ b/docs/buttons/buttons-icons.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Button icons - + + jQuery Mobile Docs - Button icons + - - + +
    @@ -22,24 +22,24 @@

    Button icons

    - +

    Adding Icons to Buttons

    -

    The jQuery Mobile framework includes a selected set of icons most often needed for mobile apps. To minimize download size, jQuery Mobile includes a single white icon sprite, and automatically adds a semi-transparent black circle behind the icon to ensure that it has good contrast on any background color.

    - - -

    An icon can be added to a button by adding a data-icon attribute on the anchor specifying the icon to display. For example, the following markup:

    - +

    The jQuery Mobile framework includes a selected set of icons most often needed for mobile apps. To minimize download size, jQuery Mobile includes a single white icon sprite, and automatically adds a semi-transparent black circle behind the icon to ensure that it has good contrast on any background color.

    + + +

    An icon can be added to a button by adding a data-icon attribute on the anchor specifying the icon to display. For example, the following markup:

    + <a href="index.html" data-role="button" data-icon="delete">Delete</a> - +

    Creates this button with an icon:

    Delete - +

    Icon set

    - +

    The following data-icon attributes can be referenced to create the icons shown below:

    - +

    Left arrow - data-icon="arrow-l"

    My button

    Right arrow - data-icon="arrow-r"

    @@ -76,13 +76,13 @@

    Icon set

    My button

    Search - data-icon="search"

    My button - +

    Icon positioning

    By default, all icons in buttons are placed to the left of the button text.

    Delete - -

    This default may be overridden using the data-iconpos attribute to set the icon to the right, above (top) or below (bottom) the text. For example, the markup:

    + +

    This default may be overridden using the data-iconpos attribute to set the icon to the right, above (top) or below (bottom) the text. For example, the markup:

    <a href="index.html" data-role="button" data-icon="delete" data-iconpos="right">Delete</a> @@ -93,10 +93,10 @@

    Icon positioning

    Icons can also be positioned above the text by specifying data-iconpos="top"

    Delete - +

    Or icons can also be positioned below the text by specifying data-iconpos="bottom"

    Delete - +

    You can also create an icon-only button, by setting the data-iconpos attribute to notext. The button plugin will hide the text on-screen, but add it as a title attribute on the link to provide context for screen readers and devices that support tooltips. For example, replacing data-iconpos="right" on the previous example with data-iconpos="notext":

    @@ -108,11 +108,11 @@

    Icon positioning

    Custom Icons

    To use custom icons, specify a data-icon value that has a unique name like myapp-email and the button plugin will generate a class by prefixing ui-icon- to the data-icon value and apply it to the button. You can then write a CSS rule that targets the ui-icon-myapp-email class to specify the icon background source. To maintain visual consistency, create a white icon 18x18 pixels saved as a PNG-8 with alpha transparency.

    - - + +

    Icons and themes

    The semi-transparent black circle behind the white icon ensures good contrast on any background color so it works well with the jQuery Mobile theming system. Here are examples of the same icons sitting on top of a range of different color swatches in out theme.

    - +

    Swatch "A" themed buttons

    @@ -135,7 +135,7 @@

    Icons and themes

    My button My button
    - +

    Swatch "B" themed buttons

    @@ -158,7 +158,7 @@

    Icons and themes

    My button My button
    - +

    Swatch "C" themed buttons

    @@ -181,34 +181,34 @@

    Icons and themes

    My button My button
    - -
    - + +
    +
    - +
    - +

    More in this section

    - +
    -
    +
    - + diff --git a/docs/buttons/buttons-inline.html b/docs/buttons/buttons-inline.html index a47684a6d57..73f06bf0605 100755 --- a/docs/buttons/buttons-inline.html +++ b/docs/buttons/buttons-inline.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Inline buttons - + + jQuery Mobile Docs - Inline buttons + - - + +
    @@ -22,19 +22,19 @@

    Inline buttons

    - +

    By default, all buttons in the body content are styled as block-level element so they fill the width of the screen:

    - + Button - - + +

    However, if you want a more compact button that is only as wide as the text and icons inside, add the data-inline="true" attribute to the button:

    - - + + Button - +

    If you have multiple buttons that should sit side-by-side on the same line, add the data-inline="true" attribute to each button. This will style the buttons to be the width of their content and float the buttons so they sit on the same line.

    - +
    
     <a href="index.html" data-role="button" data-inline="true">Cancel</a>
     <a href="index.html" data-role="button" data-inline="true" data-theme="b">Save</a>
    @@ -45,10 +45,10 @@ 

    Inline buttons

    Cancel Save - -

    If you want buttons to sit side-by-side but stretch to fill the width of the screen, you can use the content column grids to put normal full-width buttons into 2- or 3-columns.

    - -
    + +

    If you want buttons to sit side-by-side but stretch to fill the width of the screen, you can use the content column grids to put normal full-width buttons into 2- or 3-columns.

    + +
    @@ -67,7 +67,7 @@

    More in this section

    -
    + diff --git a/docs/buttons/buttons-themes.html b/docs/buttons/buttons-themes.html index f28d39fa9be..f9231262776 100644 --- a/docs/buttons/buttons-themes.html +++ b/docs/buttons/buttons-themes.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Button Theming - + + jQuery Mobile Docs - Button Theming + - - + +
    @@ -22,34 +22,34 @@

    Theming buttons

    - +

    Theming

    - +

    jQuery Mobile has a rich theming system that gives you full control of how buttons are styled. When a link is added to a container, it is automatically assigned a theme swatch letter that matches it's parent bar or content box to visually integrate the button into the parent container, like a chameleon. So a button placed inside a content container with a theme of "a" (black in the default theme) will be automatically assigned the button theme of "a" (charcoal in the default theme). Here are examples of the button theme pairings in the default theme. All buttons have the same HTML markup:

    - +

    A swatch

    Button

    B swatch

    Button

    C swatch

    Button

    D swatch

    Button

    E swatch

    Button
    - +

    Assigning theme swatches

    Button can be manually assigned any of the button color swatches from the theme to add visual contrast with the container they sit inside by adding the data-theme attribute on the button markup and specifying a swatch letter.

    -
    			
    -<a href="index.html" data-role="button" data-theme="a">Theme a</a>			
    +
    
    +<a href="index.html" data-role="button" data-theme="a">Theme a</a>
     
    - +

    Here are 4 buttons with icons that have a different swatch letter assigned via the data-theme attribute.

    - + Theme a Theme b Theme c Theme d Theme e - +

    Theme variations

    - +

    "a" theme on container with themed buttons inside

    Theme a @@ -58,7 +58,7 @@

    Theme variations

    Theme d Theme e
    - +

    "b" theme on container with themed buttons inside

    Theme a @@ -67,7 +67,7 @@

    Theme variations

    Theme d Theme e
    - +

    "c" theme on container with themed buttons inside

    Theme a @@ -76,7 +76,7 @@

    Theme variations

    Theme d Theme e
    - +

    "d" theme on container with themed buttons inside

    Theme a @@ -85,7 +85,7 @@

    Theme variations

    Theme d Theme e
    - +

    "e" theme on container with themed buttons inside

    Theme a @@ -94,34 +94,34 @@

    Theme variations

    Theme d Theme e
    - -
    - + +
    +
    - + -
    +
    - + diff --git a/docs/buttons/buttons-types.html b/docs/buttons/buttons-types.html index 15a9f3e0c88..57e2f6d64a2 100755 --- a/docs/buttons/buttons-types.html +++ b/docs/buttons/buttons-types.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Button types - + + jQuery Mobile Docs - Button types + - - + +
    @@ -22,9 +22,9 @@

    Button markup options

    - +

    Buttons that are used for navigation should be coded as anchor links, and those that submit forms as button elements — each will be styled identically by the framework.

    - +

    Styling links as buttons

    In the main content block of a page, you can style any anchor link as a button by adding the data-role="button" to the link. The framework will add all necessary classes to style the link as a button. For example, this markup:

    @@ -35,7 +35,7 @@

    Styling links as buttons

    Produces this link-based button:

    Link button - +

    Form buttons

    For ease of styling, the framework automatically converts any button element or input with a type of submit, reset, button, or image into a custom styled link-based button — there is no need to add the data-role="button" attribute.

    The original form-based button is hidden, but remains in the markup. When a click event fires on a link button, it triggers a click on the original form button.

    @@ -43,46 +43,46 @@

    Form buttons

    Button based button:

    - +

    Input type="button" based button:

    - +

    Input type="submit" based button:

    - +

    Input type="reset" based button:

    - +

    Input type="image" based button:

    - -
    - + +
    +
    - + -
    +
    - + diff --git a/docs/buttons/index.html b/docs/buttons/index.html index ef92101cfc2..6f13d97002e 100755 --- a/docs/buttons/index.html +++ b/docs/buttons/index.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Buttons - + + jQuery Mobile Docs - Buttons + - - + +
    diff --git a/docs/content/api-content.html b/docs/content/api-content.html index f6a32876166..dd8afcfab61 100755 --- a/docs/content/api-content.html +++ b/docs/content/api-content.html @@ -1,16 +1,16 @@ - - + + - - jQuery Mobile Docs - Content formatting - + + jQuery Mobile Docs - Content formatting + - - + +
    @@ -19,21 +19,21 @@

    Content formatting API

    - +

    Dependencies

    To be documented

    - +

    Options

    To be documented

    - +

    Methods

    To be documented

    - +

    Known Issues

    To be documented

    - - - + + +
    diff --git a/docs/content/content-collapsible-set.html b/docs/content/content-collapsible-set.html index ad2e7513981..77a507b4022 100644 --- a/docs/content/content-collapsible-set.html +++ b/docs/content/content-collapsible-set.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Collapsible Content - + + jQuery Mobile Docs - Collapsible Content + - - + +
    @@ -22,30 +22,30 @@

    Collapsible sets (Accordions)

    - +

    Collapsible set markup

    Collapsible sets start with the exact same markup as individual collapsibles. By adding a parent wrapper with a data-role="collapsible-set" attribute around a number of collapsibles, the framework will style these to looks like a visually grouped widget and make it behave like an accordion so only one section can be open at a time.

    By default, all the sections will be collapsed. To set a section to be open when the page loads, add the data-collapsed="false" attribute to the heading of the section you want expanded.

    -
    		
    +	
    
     <div data-role="collapsible-set">
     
     	<div data-role="collapsible" data-collapsed="false">
     	<h3>Section A</h3>
     	<p>I'm the collapsible set content for section B.</p>
     	</div>
    -	
    +
     	<div data-role="collapsible">
     	<h3>Section B</h3>
     	<p>I'm the collapsible set content for section B.</p>
     	</div>
    -	
    +
     </div>
    -	
    - +
    +

    Here is an example of a collapsible set with 5 sections.

    - +

    Section A

    @@ -72,34 +72,34 @@

    Section E

    - -
    - + +
    + +
    - + diff --git a/docs/content/content-collapsible.html b/docs/content/content-collapsible.html index 4fce248b44d..7b817a7b245 100755 --- a/docs/content/content-collapsible.html +++ b/docs/content/content-collapsible.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Collapsible Content - + + jQuery Mobile Docs - Collapsible Content + - - + +
    @@ -22,21 +22,21 @@

    Collapsible content

    - +

    Collapsible content markup

    To create a collapsible blocks of content, create a container and add the data-role="collapsible" attribute.

    - +

    Directly inside this container, add any header element (H1-H6). The framework will style the header to look like a clickable button and add a "+" icon to the left to indicate it's expandable.

    - +

    After the header, add any HTML markup you want to be collapsible. The framework will wrap this markup in a container that will be hidden/shown when the heading is clicked.

    -
    		
    +	
    
     	<div data-role="collapsible">
     	<h3>I'm a header</h3>
     	<p>I'm the collapsible content. By default I'm open and displayed on the page, but you can click the header to hide me.</p>
     	</div>
    -	
    - +
    +

    I'm a header

    @@ -46,35 +46,35 @@

    I'm a header

    As the example notes, by default the content will be collapsed. To expand the content when the page loads, add the data-collapsed="false" attribute to the wrapper.

    - + <div data-role="collapsible" data-collapsed="true">

    This code will create a collapsible widget like this:

    - +

    I'm a header

    I'm the collapsible content. I'm expanded by default because I have the "collapsed" state set to false; you need to expand the header to see me.

    - +

    Collapsible content is minimally styled — we add only a bit of margin between the bar and content, and the header adopts the default Theme styles of the container it sits within.

    Collapsible example

    This page has 4 collapsible containers with different types of content inside.

    - +

    Section 1: Collapsed text block

    I'm closed when the page loads because I have the data-collapsed="true" attribute on my container.

    I'm the collapsible content. I'm the collapsible content. I'm the collapsible content. I'm the collapsible content. I'm the collapsible content. I'm the collapsible content. I'm the collapsible content.

    - +

    Section 2: Expanded on load

    I'm closed when the page loads because I don't have the data-collapsed="false" attribute on my container.

    I'm the collapsible content. I'm the collapsible content. I'm the collapsible content. I'm the collapsible content. I'm the collapsible content. I'm the collapsible content.

    - +

    Section 3: Form elements

    @@ -88,11 +88,11 @@

    Section 3: Form elements

    -
    +
    - +

    Section 4: Collapsed list

      @@ -106,7 +106,7 @@

      Section 4: Collapsed list

    • Ford
    - +

    Nested Collapsibles

    I'm a header

    @@ -116,38 +116,38 @@

    I'm a nested collapsible header

    I'm the collapsible content. By default I'm open and displayed on the page, but you can click the header to hide me.

    - +

    Collapsible sets

    It's possible to combine multiple collapsibles into a grouped sets that acts like an accordion widget. Learn more

    - - -
    - + + +
    + + - + diff --git a/docs/content/content-grids.html b/docs/content/content-grids.html index b3abe69a67a..ee778506a5a 100644 --- a/docs/content/content-grids.html +++ b/docs/content/content-grids.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Content Grids - + + jQuery Mobile Docs - Content Grids + - - + +
    @@ -22,13 +22,13 @@

    Layout grids

    - +

    Using multiple column layouts isn't generally recommended on a mobile device because of the narrow screen width, but there are times where you may need to place small elements side-by-side (like buttons or navigation tabs, for example).

    - +

    The jQuery Mobile framework provides a simple way to build CSS-based columns through a block style class convention called ui-grid.

    - +

    There are two preset configurations layouts — two-column (using the class of ui-grid-a), and three-column (using the class of ui-grid-b) — that can be used in any situation that requires columns. Grids are 100% width, completely invisible (no borders or backgrounds) and don't have padding or margins, so they shouldn't interfere with the styles of elements placed inside them.

    - +

    Two column grids

    To build a two-column (50/50%) layout, start with a container with a class of ui-grid-a, and add two child containers inside it classed with ui-block-a for the first column and ui-block-b for the second:

    @@ -40,33 +40,33 @@

    Two column grids

    - +

    The above markup produces the following content layout:

    - +
    I'm Block A and text inside will wrap.
    I'm Block B and text inside will wrap.
    - +

    As you see above, by default grid blocks have no visual styling; they simply present content side-by-side.

    - +

    Grid classes can be applied to any container. In this next example, we add ui-grid-a to a fieldset, and apply the ui-block classes to the two buttons inside to stretch them each to 50% of the screen width:

    
     <fieldset class="ui-grid-a">
     	<div class="ui-block-a"><button type="submit" data-theme="c">Cancel</button></div>
    -	<div class="ui-block-b"><button type="submit" data-theme="b">Submit</button></div>	   
    +	<div class="ui-block-b"><button type="submit" data-theme="b">Submit</button></div>
     </fieldset>
     
    - +
    -
    +
    - - + +

    Theme classes (not data-theme attributes) from the theming system can be added to an element, including grids. On the blocks below, we're adding two classes: ui-bar to add the default bar padding and ui-bar-e to apply the background gradient and font styling for the "e" toolbar theme swatch. For illustration purposes, an inline style="height:120px" attribute is also added to each grid to set each to a standard height.

    - +
    Block A
    Block B
    @@ -74,7 +74,7 @@

    Two column grids

    Three-column grids

    The other grid layout configuration uses class=ui-grid-b on the parent, and 3 child container elements, each with its respective ui-block-a/b/c class, to create a three-column layout (33/33/33%). Note: These blocks are also styled with theme classes so the grid layout is clearly visible.

    - +
    
     <div class="ui-grid-b">
     	<div class="ui-block-a">Block A</div>
    @@ -82,37 +82,37 @@ 

    Three-column grids

    <div class="ui-block-c">Block C</div> </div><!-- /grid-b -->
    - +

    This will produce a 33/33/33% grid for our content.

    - +
    Block A
    Block B
    Block C
    - +

    And an example of a 3 column grid with buttons inside:

    -
    -
    +
    +
    - +

    Four-column grids

    - +

    A four-column, 25/25/25/25% grid is created by specifying class=ui-grid-c on the parent and adding a fourth block. Note: These blocks are also styled with theme classes so the grid layout is clearly visible.

    - +
    A
    B
    C
    D
    - +

    Five-column grids

    A five-column, 20/20/20/20/20% grid is created by specifying class=ui-grid-d on the parent and adding a fourth block. Note: These blocks are also styled with theme classes so the grid layout is clearly visible.

    - +
    A
    B
    @@ -120,11 +120,11 @@

    Five-column grids

    D
    E
    - +

    Multiple row grids

    - +

    Grids are designed to wrap to multiple rows of items. For example, if you specify a 3-column grid (ui-grid-b) on a container that has nine child blocks, it will wrap to 3 rows of 3 items each. There is a CSS rule to clear the floats and start a new line when the class=ui-block-a is seen so make sure to assign block classes in a repeating sequence (a, b, c, a, b, c, etc.) that maps to the grid type:

    - +
    A
    B
    @@ -136,34 +136,34 @@

    Multiple row grids

    B
    C
    - -
    - + +
    + +
    - + diff --git a/docs/content/content-html.html b/docs/content/content-html.html index c5c6a25c8c5..3932b007bd8 100644 --- a/docs/content/content-html.html +++ b/docs/content/content-html.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - HTML formatting - + + jQuery Mobile Docs - HTML formatting + - - + +
    @@ -26,46 +26,46 @@

    HTML Formatting

    table { width:100%; } table caption { text-align:left; } table thead th { text-align:left; border-bottom-width:1px; border-top-width:1px; } - table th, td { text-align:left; padding:6px;} + table th, td { text-align:left; padding:6px;} - - - - + + + +

    The default approach to styling content in jQuery Mobile is simple: Use a light hand. Our goal is to let the browser's native rendering take precedence; we add a bit of padding for more comfortable readability, and use the theming system to apply the font family and colors.

    Taking a light hand with content styling gives designers and developers a clean slate to work with, instead of fighting against a lot of complex style overhead.

    - +

    Default HTML markup styling

    By default, jQuery Mobile themes use standard HTML styles and sizes for standard markup elements like headers, paragraph content, block quotes, anchor links, standard ordered, unordered and definition lists, and tables — as shown in the examples below:


    - +

    H1 Heading

    H2 Heading

    H3 Heading

    H4 Heading

    H5 Heading
    H6 Heading
    - +

    This is a paragraph that contains strong, emphasized and linked text. Here is more text so you can see how HTML markup works in content. Here is more text so you can see how HTML markup works in content.

    - +
    How about some blockquote action with a cite
    - +

    This is another paragraph of text so you can see how HTML markup works in content. This is another paragraph of text so you can see how HTML markup works in content. This is another paragraph of text so you can see how HTML markup works in content.

    - +

    We add a few styles to tables and fieldsets to make them more legible, which are easily overridden with customs styles.

    - +
    • Unordered list item 1
    • Unordered list item 1
    • Unordered list item 1
    - +
    1. Ordered list item 1
    2. Ordered list item 1
    3. Ordered list item 1
    - +
    Definition term
    I'm the definition text
    @@ -79,9 +79,9 @@
    H6 Heading
    Travel Itinerary - Flight: - From: - To: + Flight: + From: + To: @@ -107,35 +107,35 @@
    H6 Heading
    - - -
    - + + + + + - + diff --git a/docs/content/content-themes.html b/docs/content/content-themes.html index 7ce05325c03..772577bea8e 100755 --- a/docs/content/content-themes.html +++ b/docs/content/content-themes.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Content Themes - + + jQuery Mobile Docs - Content Themes + - - + +
    @@ -24,18 +24,18 @@

    Theming content

    Theming the content area

    The main content area of a page (container with the data-role="content" attribute) should be themed by adding the data-theme attribute to the data-role="page" container to ensure that the background colors are applied to the full page, regardless of the content length. (If you add to the data-theme to the content container, the background color will stop after the content so there may be a gap in color between the content and fixed footer.)

    - + <div data-role="page" data-theme="a"> - +

    Theming collapsible blocks

    To set the color of the collapsible header, add the data-theme attribute to the collapsible container. The icon and body are not currently themable through data attributes, but can be styled directly with custom css.

    - + <div data-role="collapsible" data-collapsed="true" data-theme="a">

    Themed examples

    - +

    A theme swatch on content & collapsible

    H1 Heading

    @@ -45,7 +45,7 @@

    I'm an themed collapsible

    I have data-theme attribute set manually on my container to set the color to match the content block I'm in.

    - +

    B theme swatch on content & collapsible

    H1 Heading

    @@ -55,7 +55,7 @@

    I'm an themed collapsible

    I have data-theme attribute set manually on my container to set the color to match the content block I'm in.

    - +

    C theme swatch on content & collapsible

    H1 Heading

    @@ -65,7 +65,7 @@

    I'm an themed collapsible

    I have data-theme attribute set manually on my container to set the color to match the content block I'm in.

    - +

    D theme swatch on content & collapsible

    H1 Heading

    @@ -75,7 +75,7 @@

    I'm an themed collapsible

    I have data-theme attribute set manually on my container to set the color to match the content block I'm in.

    - +

    E theme swatch on content & collapsible

    H1 Heading

    @@ -85,35 +85,35 @@

    I'm an themed collapsible

    I have data-theme attribute set manually on my container to set the color to match the content block I'm in.

    - - - - + + + + + - + diff --git a/docs/content/index.html b/docs/content/index.html index 10b1004e50a..7be43be8f29 100755 --- a/docs/content/index.html +++ b/docs/content/index.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Content formatting - + + jQuery Mobile Docs - Content formatting + - - + +
    @@ -24,9 +24,9 @@

    Content formatting

    The content of pages in jQuery Mobile is completely open-ended, but the jQuery Mobile framework provides a number of helpful tools and widgets — such as collapsible panels and multiple-column grid layouts — to make it easy to format your content for mobile devices.

    - - + + -
    + diff --git a/docs/forms/api-forms.html b/docs/forms/api-forms.html index 4408c795039..cc3533551f7 100755 --- a/docs/forms/api-forms.html +++ b/docs/forms/api-forms.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Forms API - + + jQuery Mobile Docs - Forms API + - - + +
    @@ -21,21 +21,21 @@

    Form API

    - +

    Dependencies

    To be documented

    - +

    Options

    To be documented

    - +

    Methods

    To be documented

    - +

    Known Issues

    To be documented

    - - - + + +
    diff --git a/docs/forms/checkboxes/events.html b/docs/forms/checkboxes/events.html index 943185181b4..de2fe12ce98 100644 --- a/docs/forms/checkboxes/events.html +++ b/docs/forms/checkboxes/events.html @@ -26,25 +26,25 @@

    Checkboxes

    Checkboxes

    - + - +

    Since the native checkbox is used as a proxy for the custom checkbox, you can watch for events on the original, native checkbox instead of needing to go through the checkbox plugin. Bind to the change event by type: change, blur, focus, keypress, click, etc.

    
     $("input[type='checkbox']").bind( "change", function(event, ui) {
       ...
     });
    -
    - +
    +

    The checkbox plugin has the following custom events:

    - +
    create triggered when a checkbox is created

    This event is used to find out when a custom checkbox was created. It is not used to create a custom checkbox. The checkbox create event can be used like this:

    @@ -52,24 +52,24 @@

    Checkboxes

    
     $("input[type='checkbox']").checkboxradio({
        create: function(event, ui) { ... }
    -});		
    +});
     			
    - +
    - +
    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/checkboxes/index.html b/docs/forms/checkboxes/index.html index 539c698fe0e..4984be656aa 100755 --- a/docs/forms/checkboxes/index.html +++ b/docs/forms/checkboxes/index.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Checkboxes - + + jQuery Mobile Docs - Checkboxes + - - + +
    @@ -22,7 +22,7 @@

    Checkboxes

    - +

    Checkboxes

    @@ -35,17 +35,17 @@

    Checkboxes

    Checkboxes are used to provide a list of options where more than one can be selected. Traditional desktop checkboxes are not optimized for touch input so in jQuery Mobile, we style the label for the checkboxes so they are larger and look clickable. A custom set of icons are added to the label to provide additional visual feedback.

    - +

    Both the radio and checkbox controls below use standard input/label markup, but are styled to be more touch-friendly. The styled control you see is actually the label element, which sits over the real input, so if images fail to load, you'll still have a functional control. In most browsers, clicking the label automatically triggers a click on the input, but we've had to trigger the update manually for a few mobile browsers that don't do this natively. On the desktop, these controls are keyboard and screen-reader accessible.

    To create a single checkbox, add an input with a type="checkbox" attribute and a corresponding label. Set the for attribute of the label to match the ID of the input so they are semantically associated.

    - +

    Because checkboxes use the label element for the text displayed next to the checkbox form element, we recommend wrapping the checkbox in a fieldset element that has a legend which acts as the title for the question. Add the data-role="controlgroup" attribute to the fieldset so it can be styled in a parallel way as text inputs, selects or other form elements.

    - +

    Lastly, need to wrap the fieldset in a div with data-role="controlgroup" attribute to the fieldset so it can be styled in a parallel way as text inputs, selects or other form elements.

    -
    	
    +
    
     <div data-role="fieldcontain">
      	<fieldset data-role="controlgroup">
     		<legend>Agree to the terms:</legend>
    @@ -62,9 +62,9 @@ 

    Checkboxes

    - +

    Vertically grouped checkboxes

    - +

    Typically, there are multiple checkboxes listed under a question title. To visually integrate multiple checkboxes into a grouped button set, the framework will automatically remove all margins between buttons and round only the top and bottom corners of the set if there is a data-role="controlgroup" attribute on the fie.

    @@ -75,7 +75,7 @@

    Vertically grouped checkboxes

    - + @@ -83,9 +83,9 @@

    Vertically grouped checkboxes

    - +

    Horizontal toggle sets

    - +

    Checkboxes can also be used for grouped button sets where more than one button can be selected at once, such as the bold, italic and underline button group seen in word processors. To make a horizontal button set, add the data-type="horizontal" to the fieldset.

    @@ -93,7 +93,7 @@

    Horizontal toggle sets

    The framework will float the labels so they sit side-by-side on a line, hide the checkbox icons and only round the left and right edges of the group.

    - +
    Font styling: @@ -104,12 +104,12 @@

    Horizontal toggle sets

    - +

    Refreshing a checkbox

    - +

    If you manipulate a radiobutton via JavaScript, you must call the refresh method on it to update the visual styling. Here is an example:

    $("input[type='checkbox']").attr("checked",true).checkboxradio("refresh"); @@ -118,17 +118,17 @@

    Refreshing a checkbox

    - -
    - + +
    +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/checkboxes/methods.html b/docs/forms/checkboxes/methods.html index aaeb14c4024..eef0b94a696 100644 --- a/docs/forms/checkboxes/methods.html +++ b/docs/forms/checkboxes/methods.html @@ -26,32 +26,32 @@

    Checkboxes

    Checkboxes

    - + - +

    The checkbox has the following methods:

    - +
    enable enable a disabled checkbox
    
      $("input[type='checkbox']").checkboxradio('enable');
     				
    - +
    disable disable a select.
    
     $("input[type='checkbox']").checkboxradio('disable');
     				
    - +
    refresh update the custom select
    If you manipulate a checkbox via JavaScript, you must call the refresh method on it to update the visual styling. @@ -59,20 +59,20 @@

    Checkboxes

    $("input[type='checkbox']:first").attr("checked",true).checkboxradio("refresh");
    - -
    - + + +
    - +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/checkboxes/options.html b/docs/forms/checkboxes/options.html index ed72d61ae61..ce2e3e99854 100644 --- a/docs/forms/checkboxes/options.html +++ b/docs/forms/checkboxes/options.html @@ -26,38 +26,38 @@

    Checkboxes

    Checkboxes

    - + - +

    The checkbox has the following options:

    - +
    theme string

    default: null, inherited from parent

    -

    Sets the theme swatch color scheme for the checkbox. This is a single letter from a-z that maps to the swatches included in your theme. By default, a checkbox will inherit the same swatch color as it's parent container if not explicitly set. This option is also exposed as a data attribute: data-theme="a"

    +

    Sets the theme swatch color scheme for the checkbox. This is a single letter from a-z that maps to the swatches included in your theme. By default, a checkbox will inherit the same swatch color as it's parent container if not explicitly set. This option is also exposed as a data attribute: data-theme="a"

    $("input[type='checkbox'").checkboxradio({ theme: "a" });
    - -
    - + + +
    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/docs-forms.html b/docs/forms/docs-forms.html index fc3187962f1..760b48251a8 100755 --- a/docs/forms/docs-forms.html +++ b/docs/forms/docs-forms.html @@ -115,16 +115,16 @@

    Refreshing form elements

    We're considering adding a refresh method to forms to let the framework refresh all the individual elemnts withing but that is a future enhancement.

    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/forms-all-native.html b/docs/forms/forms-all-native.html index 19739fa351d..1d187a12191 100755 --- a/docs/forms/forms-all-native.html +++ b/docs/forms/forms-all-native.html @@ -185,7 +185,7 @@

    Native form elements & buttons

    - +

    Button based button:

    @@ -205,16 +205,16 @@

    Native form elements & buttons

    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/forms-all.html b/docs/forms/forms-all.html index 733c4f8e793..0448eadb02b 100755 --- a/docs/forms/forms-all.html +++ b/docs/forms/forms-all.html @@ -203,16 +203,16 @@

    Form elements

    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/forms-sample-response.php b/docs/forms/forms-sample-response.php index dfbdbe0c1a6..010fd55c795 100755 --- a/docs/forms/forms-sample-response.php +++ b/docs/forms/forms-sample-response.php @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Sample form response - + + jQuery Mobile Docs - Sample form response + - - + +
    @@ -22,9 +22,9 @@
    - +
    - +

    You Chose:

    @@ -32,23 +32,23 @@ " . $_REQUEST['shipping'] . "

    "; ?> - +
    - + Change shipping method
    - -
    - + +
    +
    - +
    - +

    More in this section

    - +
    -
    +
    - + diff --git a/docs/forms/forms-sample-selfsubmit.php b/docs/forms/forms-sample-selfsubmit.php index 9f72e25e24e..77581498617 100755 --- a/docs/forms/forms-sample-selfsubmit.php +++ b/docs/forms/forms-sample-selfsubmit.php @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Sample Form Submit to Self - + + jQuery Mobile Docs - Sample Form Submit to Self + - - + +
    @@ -22,9 +22,9 @@
    - +
    - +
    Testing
    @@ -33,20 +33,20 @@ />
    - +
    - + +
    +
    - +
    - +

    More in this section

    - +
    -
    +
    - + diff --git a/docs/forms/forms-sample.html b/docs/forms/forms-sample.html index ce964e87491..6704438fe15 100755 --- a/docs/forms/forms-sample.html +++ b/docs/forms/forms-sample.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Sample Form Submit - + + jQuery Mobile Docs - Sample Form Submit + - - + +
    @@ -22,13 +22,13 @@

    Forms

    - +

    Ajax form submission

    In jQuery Mobile, form submissions are automatically handled using Ajax whenever possible, creating a smooth transition between the form and the result page. To ensure your form submits as intended, be sure to specify action and method properties on your form element. When unspecified, the method will default to get, and the action will default to the current page's relative path (found via $.mobile.path.get()

    Forms also accept attributes for transitions just like anchors, such as data-transition="pop" and data-direction="reverse". To submit a form without Ajax, you can either disable Ajax form handling globally, or per form via the data-ajax="false" attribute. The target attribute (as in target="_blank") is respected on forms as well, and will default to the browser's handling of that target when the form submits. Note that unlike anchors, the rel attribute is not allowed on forms.

    - - + +

    Default Ajax form example

    This demonstrates automated ajax handling of form submissions. The form below is configured to send regular a get request to forms-sample-response.php. On submit, jQuery Mobile will make sure that the Url specified is able to be retrieved via Ajax, and handle it appropriately. Keep in mind that just like ordinary HTTP form submissions, jQuery Mobile allows get result pages to be bookmarked by updating the Url hash when the response returns successfully. Also like ordinary form submissions, post requests do not contain query parameters in the hash, so they are not bookmarkable.

    @@ -45,11 +45,11 @@

    Default Ajax form example

    - +

    Non-Ajax form example

    - +

    To prevent form submissions from being automatically handled with Ajax, add the data-ajax="false" attribute to the form element. You can also turn of Ajax form handling completely via the ajaxEnabled global config option.

    - +

    The form below is identical to the one above except for the addition of the data-ajax="false" attribute attribute. When the submit button is pressed, it will result in a full page refresh.

    @@ -66,7 +66,7 @@

    Non-Ajax form example

    -
    +
    @@ -93,7 +93,7 @@

    More in this section

    -
    + diff --git a/docs/forms/forms-search.html b/docs/forms/forms-search.html index a5224014e5c..4493690f5c2 100755 --- a/docs/forms/forms-search.html +++ b/docs/forms/forms-search.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Search - + + jQuery Mobile Docs - Search + - - + +
    @@ -22,20 +22,20 @@

    Search inputs

    - +

    Search inputs

    Search inputs are a new HTML type that is styled with pill-shaped corners and adds a "x" icon to clear the field once you start typing. Start with an input with a type="search" attribute in your markup.

    Set the for attribute of the label to match the ID of the input so they are semantically associated and wrap them in a div with the data-role="fieldcontain" attribute to group them.

    -
    	
    +
    
     <div data-role="fieldcontain">
         <label for="search">Search Input:</label>
         <input type="search" name="password" id="search" value="" />
     </div>
    -
    - +
    +

    The search input is displayed like this:

    @@ -52,8 +52,8 @@

    Search inputs

    - -
    + +
    @@ -80,7 +80,7 @@

    More in this section

    -
    +
    @@ -92,4 +92,4 @@

    More in this section

    - + diff --git a/docs/forms/forms-slider.html b/docs/forms/forms-slider.html index 58565d00bbc..45f7ae71044 100755 --- a/docs/forms/forms-slider.html +++ b/docs/forms/forms-slider.html @@ -54,7 +54,7 @@

    Sliders

    Refreshing a slider

    - +

    If you manipulate a slider via JavaScript, you must call the refresh method on it to update the visual styling. Here is an example:

    @@ -63,16 +63,16 @@

    Refreshing a slider

    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/forms-switch.html b/docs/forms/forms-switch.html index a6ead42f053..b3624a692bb 100755 --- a/docs/forms/forms-switch.html +++ b/docs/forms/forms-switch.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Flip switch - + + jQuery Mobile Docs - Flip switch + - - + +
    @@ -21,35 +21,35 @@

    Flip switch

    - +

    Flip toggle switches

    A binary "flip" switch is a common UI element on mobile devices that is used for any binary on/off or true/false type of data input. You can either drag the flip handle like a slider or tap on each half of the switch.

    To create a flip toggle, To add a slider widget to your page, start with an select with two options. The first option will be styled as the "on" state switch and the second will be styled as the "off" state so write your options in the correct order. Set the for attribute of the label to match the ID of the input so they are semantically associated and wrap them in a div with the data-role="fieldcontain" attribute to group them.

    -
    	
    +
    
     <div data-role="fieldcontain">
     	<label for="slider">Select slider:</label>
     	<select name="slider" id="slider" data-role="slider">
     		<option value="off">Off</option>
     		<option value="on">On</option>
    -	</select> 
    +	</select>
     </div>
    -
    +

    The flip toggle switch is displayed like this:

    +

    Refreshing a flip switch

    - +

    If you manipulate a flip switch via JavaScript, you must call the refresh method on it to update the visual styling. Here is an example:

    @@ -59,17 +59,17 @@ 

    Refreshing a flip switch

    - -
    - + +
    +
    - +
    - +

    More in this section

    - +
    -
    +
    - + diff --git a/docs/forms/forms-themes.html b/docs/forms/forms-themes.html index f887b6039ed..991ee33389f 100755 --- a/docs/forms/forms-themes.html +++ b/docs/forms/forms-themes.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Theming Forms - + + jQuery Mobile Docs - Theming Forms + - - + +
    @@ -22,35 +22,35 @@

    Theming forms

    - +

    Form themes

    -

    jQuery Mobile has a rich theming system that gives you full control of how pages and forms are styled. By default all form elements inside a container will automaticlaly adopt the same theme color swatch as their parent. This allows form elements to blend into their layouts with minimal work. The data-theme attribute can be applied any individual form element to apply any of the lettered theme color swatches to create contrast and emphasis in your designs.

    - +

    jQuery Mobile has a rich theming system that gives you full control of how pages and forms are styled. By default all form elements inside a container will automaticlaly adopt the same theme color swatch as their parent. This allows form elements to blend into their layouts with minimal work. The data-theme attribute can be applied any individual form element to apply any of the lettered theme color swatches to create contrast and emphasis in your designs.

    +

    All the form elements in the examples below use the same HTML code with no theme swatch specified on the individual form elements. The only difference between each example block code is a data-theme swatch color assigned to each parent container. This illustrates the way form elements automatically adopt the theme swatch of their parent.

    - - + +

    Body swatch A

    - +
    - +
    +
    - +
    - - + +
    Font styling: @@ -61,10 +61,10 @@

    Body swatch A

    - +
    - +
    Choose a pet: @@ -81,7 +81,7 @@

    Body swatch A

    - +
    - +
    - +

    Body swatch B

    @@ -107,7 +107,7 @@

    Body swatch B

    +
    @@ -126,7 +126,7 @@

    Body swatch B

    - +
    @@ -157,7 +157,7 @@

    Body swatch B

    - +
    @@ -174,7 +174,7 @@

    Body swatch C

    +
    @@ -193,7 +193,7 @@

    Body swatch C

    - +
    @@ -224,11 +224,11 @@

    Body swatch C

    - + - - - + + +

    Body swatch D

    @@ -242,7 +242,7 @@

    Body swatch D

    +
    @@ -261,7 +261,7 @@

    Body swatch D

    - +
    @@ -292,7 +292,7 @@

    Body swatch D

    - + @@ -309,7 +309,7 @@

    Body swatch E

    +
    @@ -328,7 +328,7 @@

    Body swatch E

    - +
    @@ -359,12 +359,12 @@

    Body swatch E

    - + - - + +
    @@ -391,7 +391,7 @@

    More in this section

    - + diff --git a/docs/forms/index.html b/docs/forms/index.html index 7cf7e2f5c05..7705d86a7b9 100755 --- a/docs/forms/index.html +++ b/docs/forms/index.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Forms - + + jQuery Mobile Docs - Forms + - - + +
    @@ -21,9 +21,9 @@

    Form elements

    - +

    All form elements begin with standard html controls that are enhanced to make them more attractive and easy-to-use. In browsers that don't support the custom controls, they will still have a usable experience because these are all based on native form elements.

    - + - -
    + + diff --git a/docs/forms/plugin-eventsmethods.html b/docs/forms/plugin-eventsmethods.html index f2ab181e930..51520560628 100755 --- a/docs/forms/plugin-eventsmethods.html +++ b/docs/forms/plugin-eventsmethods.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Form Plugin Methods - + + jQuery Mobile Docs - Form Plugin Methods + - - + +
    @@ -24,155 +24,155 @@

    Form Plugin Methods

    Form methods reference

    After jQuery Mobile auto-enhances form controls into custom controls, you can manipulate many of their properties via plugin methods. The currently available methods are listed below. Check Github for updates - we're working on complete coverage.

    - +

    Selectmenu

    open open a closed select menu
    
    -$('select').selectmenu('open');			
    +$('select').selectmenu('open');
     			
    - +
    close close an open select menu
    
    -$('select').selectmenu('close');			
    +$('select').selectmenu('close');
     			
    - +
    refresh: Update the custom menu to reflect the native select element's value.

    If the number of options in the select are different than the number of items in the custom menu, it'll rebuild the custom menu. Also, if you pass a true argument you can force the rebuild to happen.

    
    -//refresh value			
    +//refresh value
     $('select').selectmenu('refresh');
     
     //refresh and force rebuild
     $('select').selectmenu('refresh', true);
     			
    - +
    enable: enable a disabled select.
    
    -$('select').selectmenu('enable');			
    +$('select').selectmenu('enable');
     			
    - +
    disable: disable a select.
    
    -$('select').selectmenu('disable');			
    +$('select').selectmenu('disable');
     			
    - -
    - - - - - - + + + + + + + +

    Textinput

    enable: enable a disabled textinput/textarea.
    
    -$('input').textinput('enable');			
    +$('input').textinput('enable');
     			
    - +
    disable: disable a textinput/textarea.
    
    -$('textarea').textinput('disable');			
    +$('textarea').textinput('disable');
     			
    - -
    - - - - - + + + + + + +

    checkboxradio

    enable: enable a disabled checkboxradio.
    
    -$('input').checkboxradio('enable');			
    +$('input').checkboxradio('enable');
     			
    - +
    disable: disable a checkboxradio.
    
    -$('input').checkboxradio('disable');			
    +$('input').checkboxradio('disable');
     			
    - +
    refresh: refresh a checkboxradio's value.
    
    -$('input').checkboxradio('refresh');			
    +$('input').checkboxradio('refresh');
     			
    -
    - - -

    Slider

    + + + +

    Slider

    enable: enable a disabled slider.
    
    -$('input').slider('enable');			
    +$('input').slider('enable');
     			
    - +
    disable: disable a slider.
    
    -$('input').slider('disable');			
    +$('input').slider('disable');
     			
    - +
    refresh: refresh a slider's value.
    
    -$('input').slider('refresh');			
    +$('input').slider('refresh');
     			
    - - -

    Form buttons

    + + +

    Form buttons

    enable: enable a disabled button.
    
    -$('input').button('enable');			
    +$('input').button('enable');
     			
    - +
    disable: disable a slider.
    
    -$('input').button('disable');			
    +$('input').button('disable');
     			
    -
    - + +

    Degraded Form Input Types

    jQuery Mobile degrades several HTML5 input types back to type=text, or type=number after adding enhanced controls. For example, inputs with a type of range are enhanced with a custom slider control, and their type is set to number to offer a usable form input alongside that slider. Inputs with a type of search are degraded back to type=text after we add our own themable search input styling.

    The page plugin contains a list of input types that are set to either true which means they'll degrade to type=text, false which means they'll be left alone, or a string such as "number", which means they'll be converted to that type (such as the case of type=range).

    - -

    You can configure which types are changed via the page plugin's degradeInputs option, which can be manipulated externally via $.mobile.page.prototype.options.degradeInputs, which has properties: color, date, datetime, "datetime-local", email, month, number, range, search, tel, time, url, and week. Be sure to configure this inside an event handler bound to the mobileinit event, so that it applies to the first page as well as subsequent pages that are loaded.

    -
    + +

    You can configure which types are changed via the page plugin's degradeInputs option, which can be manipulated externally via $.mobile.page.prototype.options.degradeInputs, which has properties: color, date, datetime, "datetime-local", email, month, number, range, search, tel, time, url, and week. Be sure to configure this inside an event handler bound to the mobileinit event, so that it applies to the first page as well as subsequent pages that are loaded.

    +
    @@ -199,7 +199,7 @@

    More in this section

    - + diff --git a/docs/forms/radiobuttons/events.html b/docs/forms/radiobuttons/events.html index bad3a34e9d1..b1af1aa7153 100644 --- a/docs/forms/radiobuttons/events.html +++ b/docs/forms/radiobuttons/events.html @@ -26,25 +26,25 @@

    Radio buttons

    Radio buttons

    - + - +

    Since the native radio button is used as a proxy for the custom radio button, you can watch for events on the original, native radio button instead of needing to go through the radio button plugin. Bind to the change event by type: change, blur, focus, keypress, click, etc.

    
     $("input[type='radio']").bind( "change", function(event, ui) {
       ...
     });
    -
    - +
    +

    The radio button plugin has the following custom events:

    - +
    create triggered when a radio button is created

    This event is used to find out when a custom radio button was created. It is not used to create a custom radio button. The radio button create event can be used like this:

    @@ -52,24 +52,24 @@

    Radio buttons

    
     $("input[type='radio']").checkboxradio({
        create: function(event, ui) { ... }
    -});		
    +});
     			
    - +
    - +
    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/radiobuttons/index.html b/docs/forms/radiobuttons/index.html index 8fcb425d5ae..a2b25670d17 100755 --- a/docs/forms/radiobuttons/index.html +++ b/docs/forms/radiobuttons/index.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Radio Buttons - - - - - - - - + + jQuery Mobile Docs - Radio Buttons + + + + + + + +
    @@ -22,7 +22,7 @@

    Radio buttons

    - +

    Radio buttons

    @@ -35,18 +35,18 @@

    Radio buttons

    Radio buttons are used to provide a list of options where only a single items can be selected. Traditional desktop radio buttons are not optimized for touch input so in jQuery Mobile, we style the label for the radio buttons so they are larger and look clickable. A custom set of icons are added to the label to provide additional visual feedback.

    - +

    Both the radio and checkbox controls below use standard input/label markup, but are styled to be more touch-friendly. The styled control you see is actually the label element, which sits over the real input, so if images fail to load, you'll still have a functional control. In most browsers, clicking the label automatically triggers a click on the input, but we've had to trigger the update manually for a few mobile browsers that don't do this natively. On the desktop, these controls are keyboard and screen-reader accessible.

    - +

    Vertically grouped radio buttons

    - +

    To create a set of radio buttons, add an input with a type="radio" attribute and a corresponding label. Set the for attribute of the label to match the ID of the input so they are semantically associated.

    - +

    Because radio buttons use the label element for the text displayed next to the checkbox form element, we recommend wrapping the radio buttons in a fieldset element that has a legend which acts as the title for the question.

    - +

    Lastly, need to wrap the fieldset in a div with data-role="controlgroup" attribute to the fieldset so it can be styled in a parallel way as text inputs, selects or other form elements.

    - -
    	
    +
    +
    
     <div data-role="fieldcontain">
         <fieldset data-role="controlgroup">
         	<legend>Choose a pet:</legend>
    @@ -66,7 +66,7 @@ 

    Vertically grouped radio buttons

    To visually integrate multiple radio buttons into a vertically grouped button set, the framework will automatically remove all margins between buttons and round only the top and bottom corners of the set if there is a data-role="controlgroup" attribute on the fie.

    - +
    Choose a pet: @@ -105,14 +105,14 @@

    Horizontal radio button sets

    The framework will float the labels so they sit side-by-side on a line, hide the radio button icons and only round the left and right edges of the group.

    - - - - - + + + + +

    Refreshing a radio button

    - +

    If you manipulate a radio button via JavaScript, you must call the refresh method on it to update the visual styling. Here is an example:

    @@ -122,17 +122,17 @@

    Refreshing a radio button

    - -
    - + +
    +
    - +
    - +

    More in this section

    - +
    -
    +
    - + diff --git a/docs/forms/radiobuttons/methods.html b/docs/forms/radiobuttons/methods.html index 8555e9132d4..e7010b46824 100644 --- a/docs/forms/radiobuttons/methods.html +++ b/docs/forms/radiobuttons/methods.html @@ -26,32 +26,32 @@

    Radio buttons

    Radio buttons

    - + - +

    The radio button has the following methods:

    - +
    enable enable a disabled radio button
    
      $("input[type='radio']").checkboxradio('enable');
     				
    - +
    disable disable a select.
    
     $("input[type='radio']").checkboxradio('disable');
     				
    - +
    refresh update the custom select
    If you manipulate a radio button via JavaScript, you must call the refresh method on it to update the visual styling. @@ -59,20 +59,20 @@

    Radio buttons

    $("input[type='radio']:first").attr("checked",true).checkboxradio("refresh");
    - -
    - + + +
    - +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/radiobuttons/options.html b/docs/forms/radiobuttons/options.html index 73374b62f4e..1941fe8c89d 100644 --- a/docs/forms/radiobuttons/options.html +++ b/docs/forms/radiobuttons/options.html @@ -26,38 +26,38 @@

    Radio buttons

    Radio buttons

    - + - +

    The radio button has the following options:

    - +
    theme string

    default: null, inherited from parent

    -

    Sets the theme swatch color scheme for the radio button. This is a single letter from a-z that maps to the swatches included in your theme. By default, a radio button will inherit the same swatch color as it's parent container if not explicitly set. This option is also exposed as a data attribute: data-theme="a"

    +

    Sets the theme swatch color scheme for the radio button. This is a single letter from a-z that maps to the swatches included in your theme. By default, a radio button will inherit the same swatch color as it's parent container if not explicitly set. This option is also exposed as a data attribute: data-theme="a"

    $("input[type='radio'").checkboxradio({ theme: "a" });
    - -
    - + + +
    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/selects/events.html b/docs/forms/selects/events.html index b1d2ebb8d97..b65f1d21cab 100644 --- a/docs/forms/selects/events.html +++ b/docs/forms/selects/events.html @@ -26,25 +26,25 @@

    Select Menus

    Select menus

    - + - +

    Since the native select menu is used as a proxy for the custom select, you can watch for events on the original, native select instead of needing to go through the select menu plugin. Bind to the change event by type: change, blur, focus, keypress, click, etc.

    -
     
    +			
    
     $( ".selector" ).bind( "change", function(event, ui) {
       ...
     });
    -
    - +
    +

    The select menu plugin has the following custom events:

    - +
    create triggered when a select menu is created

    This event is used to find out when a custom select was created. It is not used to create a custom select. The select create event can be used like this:

    @@ -52,24 +52,24 @@

    Select menus

    
     $( ".selector" ).selectmenu({
        create: function(event, ui) { ... }
    -});		
    +});
     			
    - +
    - +
    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/selects/forms-selects.html b/docs/forms/selects/forms-selects.html index 0b0cbc56913..53916ae5c4c 100644 --- a/docs/forms/selects/forms-selects.html +++ b/docs/forms/selects/forms-selects.html @@ -11,8 +11,8 @@ @@ -30,7 +30,7 @@

    Select Menus

    Select menus

    - +
    Basics Options @@ -39,7 +39,7 @@

    Select menus

    The select menus are driven off native select elements, but the native selects are hidden from view and replaced with a custom-styled select button that matches the look and feel of the jQuery Mobile framework. The replacement selects are ARIA-enabled and are keyboard accessible on the desktop as well.

    - +

    When the select button is clicked, the native select menu picker for the OS will open. When a value is selected in the menu, the custom select button is updated to match the new selection.

    To add a select widget to your page, start with a standard select element populated with a set of option elements. Set the for attribute of the label to match the ID of the select so they are semantically associated. Wrap them in a div with the data-role="fieldcontain" attribute to help visually group it in a longer form.

    @@ -159,9 +159,9 @@

    Option to use custom menus

    You can optionally use custom-styled select menus instead of the native versions. This adds the ability to theme the menu to better match the look and feel of your site and provides visual consistency across platforms. In addition, it supports multiple selection, restores missing functionality on certain platforms such as optgroup support on Android, and adds an elegant way to handle placeholder values (explained below). Lastly, the custom menus will look better on desktop browsers because native menus on the desktop tend to be fairly small compared their mobile counterparts and this can look a bit odd if desktop is a priority for your project.

    Keep in mind that there is overhead involved in parsing the native select to build a custom menu. If there are a lot of selects on a page, or a select has a long list of options, this can impact the performance of the page so we recommend using custom menus sparingly.

    - +

    To use custom menus on a specific select, just add the data-native-menu="false" attribute. Alternately, this can also programmatically set the select menu's nativeMenu configuration option to false in a callback bound to the mobileinit event to achieve the same effect. This will globally make all selects use the custom menu by default. The following must be included in the page after jQuery is loaded but before jQuery Mobile is loaded.

    - +
    @@ -428,11 +428,11 @@ 

    Data attribute support

    - - - + + +

    Refreshing a select

    - +

    If you manipulate a select via JavaScript, you must call the refresh method on it to update the visual styling. Here is an example:

    @@ -440,18 +440,18 @@ 

    Refreshing a select

    myselect[0].selectedIndex = 3; myselect.selectmenu("refresh");
    - + - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/selects/index.html b/docs/forms/selects/index.html index 416d996fdab..a75ea61071d 100644 --- a/docs/forms/selects/index.html +++ b/docs/forms/selects/index.html @@ -26,7 +26,7 @@

    Select Menus

    Select menus

    - +

    The select menus are driven off native select elements, but the native selects are hidden from view and replaced with a custom-styled select button that matches the look and feel of the jQuery Mobile framework. The replacement selects are ARIA-enabled and are keyboard accessible on the desktop as well.

    - +

    When the select button is clicked, the native select menu picker for the OS will open. When a value is selected in the menu, the custom select button is updated to match the new selection.

    To add a select widget to your page, start with a standard select element populated with a set of option elements. Set the for attribute of the label to match the ID of the select so they are semantically associated. Wrap them in a div with the data-role="fieldcontain" attribute to help visually group it in a longer form.

    @@ -155,16 +155,16 @@

    Programmatically calling the select menu plugin

    The select menu plugin will auto initialize on any page that contains a select menu, no need for a data-role attribute in the markup. However, you can directly call the select menu plugin on any selector, just like any normal jQuery plugin:

    
    -$('select').selectmenu();			
    +$('select').selectmenu();
     

    Option to use custom menus

    You can optionally use custom-styled select menus instead of the native versions. This adds the ability to theme the menu to better match the look and feel of your site and provides visual consistency across platforms. In addition, it supports multiple selection, restores missing functionality on certain platforms such as optgroup support on Android, and adds an elegant way to handle placeholder values (explained below). Lastly, the custom menus will look better on desktop browsers because native menus on the desktop tend to be fairly small compared their mobile counterparts and this can look a bit odd if desktop is a priority for your project.

    Keep in mind that there is overhead involved in parsing the native select to build a custom menu. If there are a lot of selects on a page, or a select has a long list of options, this can impact the performance of the page so we recommend using custom menus sparingly.

    - +

    To use custom menus on a specific select, just add the data-native-menu="false" attribute. Alternately, this can also programmatically set the select menu's nativeMenu configuration option to false in a callback bound to the mobileinit event to achieve the same effect. This will globally make all selects use the custom menu by default. The following must be included in the page after jQuery is loaded but before jQuery Mobile is loaded.

    - +
    @@ -431,11 +431,11 @@ 

    Styling with data attributes

    - - - + + +

    Refreshing a select

    - +

    If you manipulate a select via JavaScript, you must call the refresh method on it to update the visual styling. Here is an example:

    @@ -443,18 +443,18 @@ 

    Refreshing a select

    myselect[0].selectedIndex = 3; myselect.selectmenu("refresh");
    - + - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/selects/methods.html b/docs/forms/selects/methods.html index 088d70fe782..cf42abc79db 100644 --- a/docs/forms/selects/methods.html +++ b/docs/forms/selects/methods.html @@ -26,71 +26,71 @@

    Select Menus

    Select menus

    - + - +

    The select menu plugin has the following methods:

    - +
    close close an open select menu
    
    -$('select').selectmenu('close');			
    +$('select').selectmenu('close');
     				
    - +
    enable enable a disabled select
    
    -$('select').selectmenu('enable');			
    +$('select').selectmenu('enable');
     				
    - +
    disable disable a select.
    
    -$('select').selectmenu('disable');			
    +$('select').selectmenu('disable');
     				
    - +
    open open a closed select menu
    
    -$('select').selectmenu('open');			
    +$('select').selectmenu('open');
     				
    - +
    refresh update the custom select
    This is used to update the custom select to reflect the native select element's value.If the number of options in the select are different than the number of items in the custom menu, it'll rebuild the custom menu. Also, if you pass a true argument you can force the rebuild to happen.
    
    -//refresh value			
    +//refresh value
     $('select').selectmenu('refresh');
     
     //refresh and force rebuild
     $('select').selectmenu('refresh', true);
     				
    - -
    - + + +
    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/selects/options.html b/docs/forms/selects/options.html index f4c62c3ad78..00504f35504 100644 --- a/docs/forms/selects/options.html +++ b/docs/forms/selects/options.html @@ -26,46 +26,46 @@

    Select Menus

    Select menus

    - + - +

    The select menu plugin has the following options:

    - +
    corners boolean

    default: true

    Applies the rounded corner class to add the theme button border-radius to the select button if set to true. This option is also exposed as a data attribute: data-corners="false"

    $('select').selectmenu({ corners: "false" });
    - +
    icon string

    default: "arrow-down"

    Sets the icon for the select element from the icon set. This option is also exposed as a data attribute: data-icon="star"

    $('select').selectmenu({ icon: "star" });
    - +
    iconpos string

    default: "right"

    Position of the icon in the select button. Possible values: left, right, none, notext. The notext value will display the select as an icon-only button with no text feedback. This option is also exposed as a data attribute: data-iconpos="left"

    $('select').selectmenu({ iconpos: "left" });
    - +
    iconshadow boolean

    default: true

    Applies the icon drop shadow class to add the theme shadow style to the select button if set to true. This option is also exposed as a data attribute: data-iconshadow="false"

    $('select').selectmenu({ iconshadow: "false" });
    - +
    initSelector CSS selector string

    default: "select:not(:jqmData(role='slider'))"

    @@ -75,48 +75,48 @@

    Select menus

    });
    - +
    inline boolean

    default: null (false)

    If set to true, this will make the select button act like an inline button so the width is determined by the feedback text inside. By default, this is null (false) so the select button is full width, regardless of the feedback content. Possible values: true, false. This option is also exposed as a data attribute: data-inline="true"

    $('select').selectmenu({ inline: "true" });
    - +
    nativeMenu boolean

    default: true

    When set to true, clicking the custom-styled select menu will open the native select menu which is best for performance. If set to false, the custom select menu style will be used instead of the native menu. This option is also exposed as a data attribute: data-native-menu="false"

    $('select').selectmenu({ nativeMenu: "false" });
    - +
    shadow boolean

    default: true

    Applies the drop shadow class to add the theme shadow style to the select button if set to true. This option is also exposed as a data attribute: data-shadow="false"

    $('select').selectmenu({ shadow: "false" });
    - +
    theme string

    default: null, inherited from parent

    -

    Sets the theme swatch color scheme for the select element. This is a single letter from a-z that maps to the swatches included in your theme. By default, a select will inherit the same swatch color as it's parent container if not explicitly set. This option is also exposed as a data attribute: data-theme="a"

    +

    Sets the theme swatch color scheme for the select element. This is a single letter from a-z that maps to the swatches included in your theme. By default, a select will inherit the same swatch color as it's parent container if not explicitly set. This option is also exposed as a data attribute: data-theme="a"

    $('select').selectmenu({ theme: "a" });
    - - - + + + - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/sliders/events.html b/docs/forms/sliders/events.html index 91dc7cf9f2b..c88edaf5020 100644 --- a/docs/forms/sliders/events.html +++ b/docs/forms/sliders/events.html @@ -26,25 +26,25 @@

    Sliders

    Sliders

    - + - +

    Since the input field is changed by slider, you can watch for events on the input field instead of needing to go through the slider plugin. Bind to the change event.

    -
     
    +			
    
     $( ".selector" ).bind( "change", function(event, ui) {
       ...
     });
    -
    - +
    +

    The slider plugin has the following custom event:

    - +
    create triggered when a slider is created

    This event is used to find out when a custom slider was created. It is not used to create a custom slider. The slider create event can be used like this:

    @@ -52,24 +52,24 @@

    Sliders

    
     $( ".selector" ).slider({
        create: function(event, ui) { ... }
    -});		
    +});
     			
    - +
    - +
    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/sliders/index.html b/docs/forms/sliders/index.html index 1053ab0728b..deab03906b7 100644 --- a/docs/forms/sliders/index.html +++ b/docs/forms/sliders/index.html @@ -25,14 +25,14 @@

    Sliders

    Sliders

    - + - +

    To add a slider widget to your page, start with an input with a new HTML5 type="range" attribute. Specify the value (current value), min and max attribute values to configure the slider. The framework will parse these attributes to configure the slider.

    As you drag the slider, the input will update and vice-versa so they are always in sync so you can submit the slider value with form in a simple way. Set the for attribute of the label to match the ID of the input so they are semantically associated and wrap them in a div with the data-role="fieldcontain" attribute to group them.

    @@ -68,18 +68,18 @@

    Refreshing a slider

    $("input[type=range]").val(60).slider("refresh");
    - +
    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/sliders/methods.html b/docs/forms/sliders/methods.html index ea07c195010..a28f4821534 100644 --- a/docs/forms/sliders/methods.html +++ b/docs/forms/sliders/methods.html @@ -26,56 +26,56 @@

    Sliders

    Sliders

    - + - +

    The slider plugin has the following methods:

    -
    +
    enable enable a disabled select
    
    -$('select').slider('enable');			
    +$('select').slider('enable');
     				
    - +
    disable disable a select.
    
    -$('select').slider('disable');			
    +$('select').slider('disable');
     				
    - +
    refresh update the slider
    This is used to update the slider to reflect the native input element's value. Also, if you pass a true argument you can force the rebuild to happen.
    
    -//refresh value			
    +//refresh value
     $('select').slider('refresh');
     
     //refresh and force rebuild
     $('select').slider('refresh', true);
     				
    - -
    - + +
    +
    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/sliders/options.html b/docs/forms/sliders/options.html index 241a4408bb9..f58427d136f 100644 --- a/docs/forms/sliders/options.html +++ b/docs/forms/sliders/options.html @@ -26,19 +26,19 @@

    Sliders

    Sliders

    - + - +

    The slider plugin has the following options:

    - - + +
    initSelector CSS selector string

    default: "input[type='range'], :jqmData(type='range'), :jqmData(role='slider')"

    @@ -48,27 +48,27 @@

    Sliders

    });
    - +
    theme string

    default: null, inherited from parent

    -

    Sets the theme swatch color scheme for the select element. This is a single letter from a-z that maps to the swatches included in your theme. By default, a select will inherit the same swatch color as it's parent container if not explicitly set. This option is also exposed as a data attribute: data-theme="a"

    +

    Sets the theme swatch color scheme for the select element. This is a single letter from a-z that maps to the swatches included in your theme. By default, a select will inherit the same swatch color as it's parent container if not explicitly set. This option is also exposed as a data attribute: data-theme="a"

    $('input').slider({ theme: "a" });
    - - - + + + - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/texts/events.html b/docs/forms/texts/events.html index 3cb64776e64..e9206653803 100644 --- a/docs/forms/texts/events.html +++ b/docs/forms/texts/events.html @@ -26,25 +26,25 @@

    Text inputs

    Text inputs

    - + - +

    Since the native text inputs and textareas are used as a proxy for the custom text inputs, you can watch for events on the original, native text input and textareas instead of needing to go through the text input plugin. Bind to the change event by type: change, blur, focus, keypress, click, etc.

    -
     
    +			
    
     $( ".selector" ).bind( "change", function(event, ui) {
       ...
     });
    -
    - +
    +

    The text input plugin has the following custom events:

    - +
    create triggered when a text input is created

    This event is used to find out when a custom text input was created. It is not used to create a custom text input. The text input create event can be used like this:

    @@ -52,23 +52,23 @@

    Text inputs

    
     $( ".selector" ).textinput({
        create: function(event, ui) { ... }
    -});		
    +});
     			
    - +
    - +
    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/texts/forms-text.html b/docs/forms/texts/forms-text.html index 124094492b7..8162286a574 100755 --- a/docs/forms/texts/forms-text.html +++ b/docs/forms/texts/forms-text.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Text inputs - + + jQuery Mobile Docs - Text inputs + - - + +
    @@ -22,102 +22,102 @@

    Text inputs

    - +

    Text inputs and textareas are coded with standard HTML elements, then enhanced by jQuery Mobile to make them more attractive and useable on a mobile.

    - +

    Text inputs

    To collect standard alphanmeric text, use an input with a type="text" attribute. It's important to set the for attribute of the label to match the ID of the input so they are semantically associated and wrap them in a div with the data-role="fieldcontain" attribute to group them.

    -
    	
    +
    
     <div data-role="fieldcontain">
         <label for="name">Text Input:</label>
         <input type="text" name="name" id="name" value=""  />
    -</div>	
    -
    - +</div> +
    +

    The text input is displayed like this:

    - - + +

    Password inputs

    For password fields, use an input with a type="password" attribute. Set the for attribute of the label to match the ID of the input so they are semantically associated and wrap them in a div with the data-role="fieldcontain" attribute to group them.

    -
    	
    +
    
     <div data-role="fieldcontain">
         <label for="password">Password Input:</label>
         <input type="password" name="password" id="password" value="" />
    -</div>	
    -
    - +</div> +
    +

    The password input is displayed like this:

    - - + +

    More standard HTML5 input types

    In jQuery Mobile, you can use new HTML5 input types such as email, tel, number, and more. We actively degrade certain types to type=text (currently, range and search) in certain cases when we provide a replacement for that type's native control. You can configure which types are degraded to text through the page plugin's options.

    - +
    - +
    - +
    - +
    - +

    Textareas

    For multi-line text inputs, use a textarea element. The framework will auto-grow the height of the textarea to avoid the need for an internal scrollbar which is very hard to use on a mobile device.

    Set the for attribute of the label to match the ID of the input so they are semantically associated and wrap them in a div with the data-role="fieldcontain" attribute to group them.

    -
    	
    +
    
     <div data-role="fieldcontain">
     	<label for="textarea">Textarea:</label>
     	<textarea cols="40" rows="8" name="textarea" id="textarea"></textarea>
     </div>
    -
    - +
    +

    The textarea is displayed like this and will grow as you type:

    - - + +
    - -
    - + +
    +
    - +
    - +

    More in this section

    - +
    -
    +
    - + diff --git a/docs/forms/texts/index.html b/docs/forms/texts/index.html index bb3a0b2e976..44da626bbe5 100755 --- a/docs/forms/texts/index.html +++ b/docs/forms/texts/index.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Text inputs - + + jQuery Mobile Docs - Text inputs + - - + +
    @@ -22,11 +22,11 @@

    Text inputs

    - +

    Text inputs

    - +
    • Basics
    • Options
    • @@ -36,97 +36,97 @@

      Text inputs

      Text inputs and textareas are coded with standard HTML elements, then enhanced by jQuery Mobile to make them more attractive and useable on a mobile.

      - +

      Text inputs

      To collect standard alphanmeric text, use an input with a type="text" attribute. It's important to set the for attribute of the label to match the ID of the input so they are semantically associated and wrap them in a div with the data-role="fieldcontain" attribute to group them.

      -
      	
      +
      
       <div data-role="fieldcontain">
           <label for="name">Text Input:</label>
           <input type="text" name="name" id="name" value=""  />
      -</div>	
      -
      - +</div> +
      +

      The text input is displayed like this:

      - - + +

      Password inputs

      For password fields, use an input with a type="password" attribute. Set the for attribute of the label to match the ID of the input so they are semantically associated and wrap them in a div with the data-role="fieldcontain" attribute to group them.

      -
      	
      +
      
       <div data-role="fieldcontain">
           <label for="password">Password Input:</label>
           <input type="password" name="password" id="password" value="" />
      -</div>	
      -
      - +</div> +
      +

      The password input is displayed like this:

      - - + +

      More standard HTML5 input types

      In jQuery Mobile, you can use new HTML5 input types such as email, tel, number, and more. We actively degrade certain types to type=text (currently, range and search) in certain cases when we provide a replacement for that type's native control. You can configure which types are degraded to text through the page plugin's options.

      - +
      - +
      - +
      - +
      - +

      Textareas

      For multi-line text inputs, use a textarea element. The framework will auto-grow the height of the textarea to avoid the need for an internal scrollbar which is very hard to use on a mobile device.

      Set the for attribute of the label to match the ID of the input so they are semantically associated and wrap them in a div with the data-role="fieldcontain" attribute to group them.

      -
      	
      +
      
       <div data-role="fieldcontain">
       	<label for="textarea">Textarea:</label>
       	<textarea cols="40" rows="8" name="textarea" id="textarea"></textarea>
       </div>
      -
      - +
      +

      The textarea is displayed like this and will grow as you type:

      - - + + - -
    - + +
    +
    - +
    - +

    More in this section

    - +
    -
    +
    - + diff --git a/docs/forms/texts/methods.html b/docs/forms/texts/methods.html index ca17f3ce635..130ac14c469 100644 --- a/docs/forms/texts/methods.html +++ b/docs/forms/texts/methods.html @@ -26,45 +26,45 @@

    Text inputs

    Text inputs

    - + - +

    The text input plugin has the following methods:

    - +
    enable enable a disabled text input.
    
    -$('.selector').textinput('enable');			
    +$('.selector').textinput('enable');
     				
    - +
    disable disable a text input.
    
    -$('.selector').textinput('disable');			
    +$('.selector').textinput('disable');
     				
    - -
    - + + +
    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/forms/texts/options.html b/docs/forms/texts/options.html index 87e3e9c61f3..bb8abdf7e0f 100644 --- a/docs/forms/texts/options.html +++ b/docs/forms/texts/options.html @@ -26,38 +26,38 @@

    Text inputs

    Text inputs

    - + - +

    The text input plugin has the following options:

    - +
    theme string

    default: null, inherited from parent

    -

    Sets the theme swatch color scheme for the text input element. This is a single letter from a-z that maps to the swatches included in your theme. By default, a text input will inherit the same swatch color as it's parent container if not explicitly set. This option is also exposed as a data attribute: data-theme="a"

    +

    Sets the theme swatch color scheme for the text input element. This is a single letter from a-z that maps to the swatches included in your theme. By default, a text input will inherit the same swatch color as it's parent container if not explicitly set. This option is also exposed as a data attribute: data-theme="a"

    $('.selector').textinput({ theme: "a" });
    - -
    - + + +
    - - + +
    - +
    - +

    More in this section

    - +
    -
    + - + diff --git a/docs/index.html b/docs/index.html index 18f2bda7a92..61bc97fe64c 100755 --- a/docs/index.html +++ b/docs/index.html @@ -4,14 +4,14 @@ jQuery UI Mobile Framework - Documentation - + - - + +
    @@ -20,7 +20,7 @@

    jQuery Mobile Docs

    - + - +

    Numbered list

    1. The Godfather
    2. @@ -50,7 +50,7 @@

      Numbered list

    3. Pulp Fiction
    4. Schindler's List
    - +

    Divided, formatted content

    - - - + + +

    Icon list

    - +

    Thumbnail, split button list

    - +

    Divided, filterable list

    • A
    • @@ -118,9 +118,9 @@

      Divided, filterable list

      - + -
    +
    @@ -136,7 +136,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -157,7 +157,7 @@

    More in this section

    - + diff --git a/docs/lists/lists-count.html b/docs/lists/lists-count.html index 866f7f42cf0..f7c3d52cecd 100755 --- a/docs/lists/lists-count.html +++ b/docs/lists/lists-count.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Lists Count Bubbles - + + jQuery Mobile Docs - Lists Count Bubbles + - - + +
    @@ -29,7 +29,7 @@

    Basic list

  • Sent 328
  • Trash 62
  • -
    +
    @@ -45,7 +45,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -66,7 +66,7 @@

    More in this section

    - + diff --git a/docs/lists/lists-divider.html b/docs/lists/lists-divider.html index 0a766103339..1887b71f860 100755 --- a/docs/lists/lists-divider.html +++ b/docs/lists/lists-divider.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - List Dividers - + + jQuery Mobile Docs - List Dividers + - - + +
    @@ -60,7 +60,7 @@

    List dividers

  • S
  • Sawyer Wakefield
  • -
    +
    @@ -76,7 +76,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -97,7 +97,7 @@

    More in this section

    - + diff --git a/docs/lists/lists-formatting.html b/docs/lists/lists-formatting.html index c37c01b5186..500433d7880 100755 --- a/docs/lists/lists-formatting.html +++ b/docs/lists/lists-formatting.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - List Formatting - + + jQuery Mobile Docs - List Formatting + - - + + +
    @@ -96,7 +96,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -117,7 +117,7 @@

    More in this section

    - + diff --git a/docs/lists/lists-forms-inset.html b/docs/lists/lists-forms-inset.html index 18e3c9acbb6..4b91ecda6c5 100644 --- a/docs/lists/lists-forms-inset.html +++ b/docs/lists/lists-forms-inset.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Inset Lists with Forms - + + jQuery Mobile Docs - Inset Lists with Forms + - - + +
    @@ -52,27 +52,27 @@

    Inset with Forms

    Choose as many snacks as you'd like: - + - + - + - +
  • Font styling: - + - +
    @@ -93,8 +93,8 @@

    Inset with Forms

  • - - + +
  • Layout view: @@ -190,14 +190,14 @@

    Inset with Forms

  • - + - + - -
    + +
    @@ -213,7 +213,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -234,7 +234,7 @@

    More in this section

    - + diff --git a/docs/lists/lists-forms.html b/docs/lists/lists-forms.html index a0dbd86e578..4b87b2db392 100644 --- a/docs/lists/lists-forms.html +++ b/docs/lists/lists-forms.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Lists with Forms - + + jQuery Mobile Docs - Lists with Forms + - - + +
    @@ -52,27 +52,27 @@

    Lists with Forms

    Choose as many snacks as you'd like: - + - + - + - +
  • Font styling: - + - +
    @@ -93,8 +93,8 @@

    Lists with Forms

  • - - + +
  • Layout view: @@ -190,12 +190,12 @@

    Lists with Forms

  • - + - + - -
    + +
    @@ -211,7 +211,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -232,7 +232,7 @@

    More in this section

    - + diff --git a/docs/lists/lists-icons.html b/docs/lists/lists-icons.html index 0c0991a44d3..16d148651f7 100755 --- a/docs/lists/lists-icons.html +++ b/docs/lists/lists-icons.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - List Icons - + + jQuery Mobile Docs - List Icons + - - + +
    @@ -27,15 +27,15 @@

    Icons

  • GermanyGermany 4
  • Great BritainGreat Britain 0
  • FinlandFinland 12
  • - - + +
  • NorwayNorway 328
  • United StatesUnited States 62
  • -
    +
    @@ -51,7 +51,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -72,7 +72,7 @@

    More in this section

    - + diff --git a/docs/lists/lists-inset.html b/docs/lists/lists-inset.html index 60532abfb5f..fdb4c83ce14 100755 --- a/docs/lists/lists-inset.html +++ b/docs/lists/lists-inset.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Lists with Form Controls - + + jQuery Mobile Docs - Lists with Form Controls + - - + +
    @@ -41,7 +41,7 @@

    Count bubbles

  • Sent 328
  • Trash 62
  • - +

    Numbered list

    1. The Godfather
    2. @@ -50,7 +50,7 @@

      Numbered list

    3. Pulp Fiction
    4. Schindler's List
    - +

    Divided, formatted content

    - - - + + +

    Icon list

    - +

    Thumbnail, split button list

    - +

    Divided, filterable list

    • A
    • @@ -118,10 +118,10 @@

      Divided, filterable list

      - + - -
    + +
    @@ -137,7 +137,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -158,7 +158,7 @@

    More in this section

    - + diff --git a/docs/lists/lists-nested.html b/docs/lists/lists-nested.html index aec940cdc6c..6f9feb984a5 100755 --- a/docs/lists/lists-nested.html +++ b/docs/lists/lists-nested.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Nested Lists - + + jQuery Mobile Docs - Nested Lists + - - + +
    @@ -21,12 +21,12 @@

    Nested list

    -
    +
    • Animals

      All your favorites from aarkvarks to zebras.

      - +
      • Pets
          @@ -76,7 +76,7 @@

          Animals

          Colors

          Fresh colors from the magic rainbow.

          - +
          • Blue
          • Green
          • @@ -90,7 +90,7 @@

            Colors

          • Vehicles

            Everything from cars to planes.

            - +
            • Cars -
            • +
          -
    +
    @@ -156,7 +156,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -177,7 +177,7 @@

    More in this section

    -
    + diff --git a/docs/lists/lists-ol.html b/docs/lists/lists-ol.html index bdfaf081c4a..c3d35cc1cbb 100755 --- a/docs/lists/lists-ol.html +++ b/docs/lists/lists-ol.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Ordered Lists - + + jQuery Mobile Docs - Ordered Lists + - - + +
    @@ -21,7 +21,7 @@

    Numbered list

    -
    +
    1. The Godfather
    2. Inception
    3. @@ -44,7 +44,7 @@

      Numbered list

    4. The Big Lebowski
    5. Psycho
    -
    +
    @@ -60,7 +60,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -81,7 +81,7 @@

    More in this section

    -
    + diff --git a/docs/lists/lists-performance.html b/docs/lists/lists-performance.html index feb5b897869..0063edb5664 100755 --- a/docs/lists/lists-performance.html +++ b/docs/lists/lists-performance.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - List Performance Test + + jQuery Mobile Docs - List Performance Test - - + +
    @@ -522,9 +522,9 @@

    500 item list

  • Nissan
  • Porsche
  • Subaru
  • -
  • Toyota
  • +
  • Toyota
  • -
    +
    @@ -540,7 +540,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -561,7 +561,7 @@

    More in this section

    - + diff --git a/docs/lists/lists-readonly-inset.html b/docs/lists/lists-readonly-inset.html index 1adb8ac6232..0fffe894684 100644 --- a/docs/lists/lists-readonly-inset.html +++ b/docs/lists/lists-readonly-inset.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Readonly Inset Lists - + + jQuery Mobile Docs - Readonly Inset Lists + - - + +
    @@ -40,7 +40,7 @@

    Count bubbles

  • Sent 328
  • Trash 62
  • - +

    Numbered list

    1. The Godfather
    2. @@ -49,7 +49,7 @@

      Numbered list

    3. Pulp Fiction
    4. Schindler's List
    - +

    Divided, formatted content

    • @@ -65,10 +65,10 @@

      jQuery Team

      9:18AM

    - - - + + +

    Icon list

    • FranceFrance 4
    • @@ -78,7 +78,7 @@

      Icon list

    • NorwayNorway 328
    • United StatesUnited States 62
    - +

    Thumbnail list

      @@ -98,7 +98,7 @@

      Wolfgang Amadeus Phoenix

      Phoenix

    - +

    Divided, filterable list

    • A
    • @@ -115,9 +115,9 @@

      Divided, filterable list

      - - -
    + + +
    @@ -133,7 +133,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -154,7 +154,7 @@

    More in this section

    - + diff --git a/docs/lists/lists-readonly.html b/docs/lists/lists-readonly.html index c14eb287792..062287d755e 100644 --- a/docs/lists/lists-readonly.html +++ b/docs/lists/lists-readonly.html @@ -1,20 +1,20 @@ - - + + - - jQuery Mobile Docs - Inset Readonly Lists - + + jQuery Mobile Docs - Inset Readonly Lists + - - + +
    - + @@ -27,9 +27,9 @@

    Inset Readonly Lists

    Here is a variety of full-width lists that are read-only. If a list has the data-role="listview" attribute, but the contents aren't linked, it will display as read-only. These look like normal lists, but don't have a right arrow. - +

    Simple list

    - +
    • Acura
    • Audi
    • @@ -46,7 +46,7 @@

      Count bubbles

    • Sent 328
    • Trash 62
    - +

    Numbered list

    1. The Godfather
    2. @@ -55,7 +55,7 @@

      Numbered list

    3. Pulp Fiction
    4. Schindler's List
    - +

    Divided, formatted content

    • @@ -71,10 +71,10 @@

      jQuery Team

      9:18AM

    - - - + + +

    Icon list

    • FranceFrance 4
    • @@ -84,7 +84,7 @@

      Icon list

    • NorwayNorway 328
    • United StatesUnited States 62
    - +

    Thumbnail list

      @@ -104,7 +104,7 @@

      Wolfgang Amadeus Phoenix

      Phoenix

    - +

    Divided, filterable list

    • A
    • @@ -118,8 +118,8 @@

      Divided, filterable list

    • Christopher Adams
    - -
    + +
    @@ -135,7 +135,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -156,7 +156,7 @@

    More in this section

    -
    + diff --git a/docs/lists/lists-search-inset.html b/docs/lists/lists-search-inset.html index 2118941c9de..436dd130860 100755 --- a/docs/lists/lists-search-inset.html +++ b/docs/lists/lists-search-inset.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Filtered Inset Lists - + + jQuery Mobile Docs - Filtered Inset Lists + - - + +
    @@ -21,7 +21,7 @@

    Inset Search filter bar

    -
    +
    -
    +
    @@ -62,7 +62,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -83,7 +83,7 @@

    More in this section

    -
    + diff --git a/docs/lists/lists-search-with-dividers.html b/docs/lists/lists-search-with-dividers.html index c36e284639e..91185ea4d9c 100644 --- a/docs/lists/lists-search-with-dividers.html +++ b/docs/lists/lists-search-with-dividers.html @@ -1,16 +1,16 @@ - - + + - - jQuery Mobile Docs - Filtered Lists with Dividers - + + jQuery Mobile Docs - Filtered Lists with Dividers + - - + +
    @@ -20,7 +20,7 @@

    List dividers

    -
    +
    -
    +
    @@ -75,7 +75,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -96,7 +96,7 @@

    More in this section

    -
    + diff --git a/docs/lists/lists-search.html b/docs/lists/lists-search.html index 9e953866d06..23d2475c256 100755 --- a/docs/lists/lists-search.html +++ b/docs/lists/lists-search.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Filtered Lists - + + jQuery Mobile Docs - Filtered Lists + - - + +
    @@ -21,7 +21,7 @@

    Search filter bar

    -
    +
    -
    +
    @@ -62,7 +62,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -83,7 +83,7 @@

    More in this section

    -
    + diff --git a/docs/lists/lists-split-purchase.html b/docs/lists/lists-split-purchase.html index f62f2808380..0a3de770a20 100755 --- a/docs/lists/lists-split-purchase.html +++ b/docs/lists/lists-split-purchase.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Sample Dialog - + + jQuery Mobile Docs - Sample Dialog + - - + +
    diff --git a/docs/lists/lists-split.html b/docs/lists/lists-split.html index 80349ba1822..5a7a52ca114 100755 --- a/docs/lists/lists-split.html +++ b/docs/lists/lists-split.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Split Button Lists - + + jQuery Mobile Docs - Split Button Lists + - - + +
    @@ -21,7 +21,7 @@

    List formatting

    +
    diff --git a/docs/lists/lists-themes.html b/docs/lists/lists-themes.html index e96555d26c2..3c253304892 100755 --- a/docs/lists/lists-themes.html +++ b/docs/lists/lists-themes.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Theming Lists - + + jQuery Mobile Docs - Theming Lists + - - + +
    @@ -21,10 +21,10 @@

    Theming lists

    -
    +

    All the standard button swatches can be applied to lists. The framework assigns a default list theme swatch of "c" (silver in the default theme) and swatch "b" (blue in default theme) for dividers. Below is a default themed list.

    - + <ul data-role="listview" data-inset="true"> @@ -34,23 +34,23 @@

    Theming lists

  • Outbox 0
  • Sent 328
  • - +

    Theming list items

    The list item color scheme can be changed to any button color theme swatch by adding the data-theme attribute to the list, and setting the letter theme swatch. Here is the same list above with the "a" swatch applied.

    - + <ul data-role="listview" data-inset="true" data-theme="d"> - + - +

    data-theme attributes also work at the LI-level, for styling a single item.

    - + - +

    Theming dividers

    - +

    The theme for list dividers can be set by adding the data-divider-theme to the list and specifying a swatch letter. Here is an example of the same list above with swatch "d" set on the dividers.

    - + <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="e"> - + - +

    Theming count bubbles

    - +

    The theme for count bubbles can be set by adding the data-count-theme to the list and specifying a swatch letter. Here is an example with swatch "e" set on the dividers.

    - + <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="e" data-count-theme="b"> - + - +

    Theming icons

    - +

    The default icon for each list item is arrow-r. To override this, set the data-icon attribute on the desired list item to the name of a standard icon. To prevent icons from appearing altogether, set the data-icon attribute to "false".

     
    @@ -105,12 +105,12 @@ 

    Theming icons

  • Alerts
  • No icon
  • - - + +

    Theming split buttons

    - +

    For split lists which a second button, the framework default to "b" for the theme swatch (blue in the default theme) Here is a default split list:

    - + - + <ul data-role="listview" data-inset="true" data-split-theme="a"> @@ -148,7 +148,7 @@

    Warning

    The icon for the split theme can set at the list level by adding the data-split-icon to the list and specifying a standard icon. This attribute can also be added to individual split inside list items by adding a data-icon attribute to specific links (see second list item).

    - + <ul data-role="listview" data-inset="true" data-split-theme="d" data-split-icon="delete"> @@ -171,46 +171,46 @@

    Warning

    - +

    Examples of all basic list swatches

    - +

    A swatch

    - +

    B swatch

    - +

    C swatch

    - +

    D swatch

    - +

    E swatch

    - - -
    + + +
    @@ -226,7 +226,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -247,7 +247,7 @@

    More in this section

    -
    + diff --git a/docs/lists/lists-thumbnails.html b/docs/lists/lists-thumbnails.html index c4510f0550e..a9ac4cfe143 100755 --- a/docs/lists/lists-thumbnails.html +++ b/docs/lists/lists-thumbnails.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Lists with Thumbnails - + + jQuery Mobile Docs - Lists with Thumbnails + - - + +
    @@ -21,7 +21,7 @@

    Thumbnails

    + diff --git a/docs/lists/lists-ul.html b/docs/lists/lists-ul.html index fba43296f2c..a42ae3fba79 100755 --- a/docs/lists/lists-ul.html +++ b/docs/lists/lists-ul.html @@ -1,18 +1,18 @@ -Home - +Home + - - jQuery Mobile Docs - Basic Lists - + + jQuery Mobile Docs - Basic Lists + - - + +
    @@ -47,7 +47,7 @@

    Basic list

  • Volkswagon
  • Volvo
  • -
    +
    @@ -63,7 +63,7 @@

    More in this section

  • Nested list
  • Numbered list
  • -
  • Split button list
  • +
  • Split button list
  • List dividers
  • Count bubble
  • Thumbnails
  • @@ -84,7 +84,7 @@

    More in this section

    - + diff --git a/docs/pages/api-pages.html b/docs/pages/api-pages.html index 9b008424669..16c624c04f8 100755 --- a/docs/pages/api-pages.html +++ b/docs/pages/api-pages.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Pages API - + + jQuery Mobile Docs - Pages API + - - + +
    @@ -21,21 +21,21 @@

    Pages API

    - +

    Dependencies

    To be documented

    - +

    Options

    To be documented

    - +

    Methods

    To be documented

    - +

    Known Issues

    To be documented

    - - - + + +
    diff --git a/docs/pages/dialog-alt.html b/docs/pages/dialog-alt.html index f2c1db9a86f..c0fae365139 100644 --- a/docs/pages/dialog-alt.html +++ b/docs/pages/dialog-alt.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Framework - Dialog Example - + + jQuery Mobile Framework - Dialog Example + - - + +
    @@ -22,8 +22,8 @@

    Dialog

    I'm colorful

    This is a regular page, styled as a dialog. To create a dialog, just link to a normal page and include a transition and data-rel="dialog" attribute.

    - Good for you - Don't care, really + Good for you + Don't care, really
    diff --git a/docs/pages/dialog-buttons.html b/docs/pages/dialog-buttons.html index f4f8a0f583e..c550feaa89d 100644 --- a/docs/pages/dialog-buttons.html +++ b/docs/pages/dialog-buttons.html @@ -1,29 +1,29 @@ - - + + - - jQuery Mobile Framework - Dialog Example - + + jQuery Mobile Framework - Dialog Example + - - + + diff --git a/docs/pages/dialog-with-select.html b/docs/pages/dialog-with-select.html index 6bf88883b48..5b9e00ba32a 100644 --- a/docs/pages/dialog-with-select.html +++ b/docs/pages/dialog-with-select.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Framework - Dialog Example with Select - + + jQuery Mobile Framework - Dialog Example with Select + - - + +
    @@ -22,8 +22,8 @@

    Dialog select test

    - -
    + +
    @@ -32,13 +32,13 @@

    Dialog select test

    - +

    Sample Dialogs

    - +
    @@ -49,7 +49,7 @@

    Sample Dialogs

    - +
    - - Real Submit Would go here + + Real Submit Would go here
    - Cancel + Cancel
    diff --git a/docs/pages/dialog.html b/docs/pages/dialog.html index 03e2bab8fb7..e428b5d68a1 100644 --- a/docs/pages/dialog.html +++ b/docs/pages/dialog.html @@ -1,20 +1,20 @@ - - + + - - jQuery Mobile Framework - Dialog Example - + + jQuery Mobile Framework - Dialog Example + - - + +
    - +

    Dialog

    @@ -23,8 +23,8 @@

    Dialog

    Delete page?

    This is a regular page, styled as a dialog. To create a dialog, just link to a normal page and include a transition and data-rel="dialog" attribute.

    - Sounds good - Cancel + Sounds good + Cancel
    diff --git a/docs/pages/docs-links-urltest/index.html b/docs/pages/docs-links-urltest/index.html index 1d1d67dc48b..4574f204f50 100644 --- a/docs/pages/docs-links-urltest/index.html +++ b/docs/pages/docs-links-urltest/index.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Framework - Test URL Example - + + jQuery Mobile Framework - Test URL Example + - - + +
    diff --git a/docs/pages/dynamic-samples/sample-reuse-page-external.html b/docs/pages/dynamic-samples/sample-reuse-page-external.html index 4ade5896511..49dd2b1b3ff 100644 --- a/docs/pages/dynamic-samples/sample-reuse-page-external.html +++ b/docs/pages/dynamic-samples/sample-reuse-page-external.html @@ -19,53 +19,53 @@ if ( category ) { // Get the page we are going to dump our content into. var $page = $( "#category-items" ), - + // Get the header for the page. $header = $page.children( ":jqmData(role=header)" ), - + // Get the content area element for the page. $content = $page.children( ":jqmData(role=content)" ), - + // The markup we are going to inject into the content // area of the page. markup = "

    " + category.description + "

      ", - + // The array of items for this category. cItems = category.items, - + // The number of items in the category. numItems = cItems.length; - + // Generate a list item for each item in the category // and add it to our markup. for ( var i = 0; i < numItems; i++ ) { markup += "
    • " + cItems[i].name + "
    • "; } markup += "
    "; - + // Find the h1 element in our header and inject the name of // the category into it. $header.find( "h1" ).html( category.name ); - + // Inject the category items markup into the content element. $content.html( markup ); - + // Pages are lazily enhanced. We call page() on the page // element to make sure it is always enhanced before we // attempt to enhance the listview markup we just injected. // Subsequent calls to page() are ignored since a page/widget // can only be enhanced once. $page.page(); - + // Enhance the listview we just injected. $content.find( ":jqmData(role=listview)" ).listview(); - + // We don't want the data-url of the page we just modified // to be the url that shows up in the browser's location field, // so set the dataUrl option to the URL for the category // we just loaded. options.dataUrl = url; - + // Now call changePage() and tell it to switch to // the page we just modified. $.mobile.changePage( $page, options ); @@ -73,7 +73,7 @@ }); } - + // Listen for any attempts to call changepage. $(document).bind( "pagebeforechange", function( e, data ) { // We only want to handle changepage calls where the caller is diff --git a/docs/pages/dynamic-samples/sample-reuse-page.html b/docs/pages/dynamic-samples/sample-reuse-page.html index 0f7e9297818..29fecbe22f4 100644 --- a/docs/pages/dynamic-samples/sample-reuse-page.html +++ b/docs/pages/dynamic-samples/sample-reuse-page.html @@ -147,7 +147,7 @@ } } - + // Listen for any attempts to call changepage. $(document).bind( "pagebeforechange", function( e, data ) { // We only want to handle changepage calls where the caller is diff --git a/docs/pages/index.html b/docs/pages/index.html index 783e3842ec2..ed92cebf6d5 100755 --- a/docs/pages/index.html +++ b/docs/pages/index.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Pages - + + jQuery Mobile Docs - Pages + - - + +
    @@ -24,7 +24,7 @@

    Pages

    jQuery Mobile includes automatic AJAX page loading of external pages with back button history support, a set of animated page transitions and simple tools for displaying pages as dialogs.

    - + -
    +
    diff --git a/docs/pages/multipage-template.html b/docs/pages/multipage-template.html index e68307532d1..5bd8ce88896 100755 --- a/docs/pages/multipage-template.html +++ b/docs/pages/multipage-template.html @@ -1,17 +1,17 @@ - - + + - - Page Title + + Page Title - + - - + +
    @@ -20,20 +20,20 @@

    Multi-page

    -
    +

    One

    - -

    I have an id of "one" on my page container. I'm first in the source order so I'm shown when the page loads.

    - -

    This is a multi-page boilerplate template that you can copy to build you first jQuery Mobile page. This template contains multiple "page" containers inside, unlike a single page template that has just one page within it.

    + +

    I have an id of "one" on my page container. I'm first in the source order so I'm shown when the page loads.

    + +

    This is a multi-page boilerplate template that you can copy to build you first jQuery Mobile page. This template contains multiple "page" containers inside, unlike a single page template that has just one page within it.

    Just view the source and copy the code to get started. All the CSS and JS is linked to the jQuery CDN versions so this is super easy to set up. Remember to include a meta viewport tag in the head to set the zoom level.

    -

    You link to internal pages by referring to the ID of the page you want to show. For example, to link to the page with an ID of "two", my link would have a href="#two" in the code.

    +

    You link to internal pages by referring to the ID of the page you want to show. For example, to link to the page with an ID of "two", my link would have a href="#two" in the code.

    Show internal pages:

    -

    Show page "two"

    +

    Show page "two"

    Show page "popup" (as a dialog)

    - +

    Page Footer

    @@ -47,14 +47,14 @@

    Page Footer

    Two

    -
    +

    Two

    -

    I have an id of "two" on my page container. I'm the second page container in this multi-page template.

    -

    Notice that the theme is different for this page because we've added a few data-theme swatch assigments here to show off how flexible it is. You can add any content or widget to these pages, but we're keeping these simple.

    -

    Back to page "one"

    - +

    I have an id of "two" on my page container. I'm the second page container in this multi-page template.

    +

    Notice that the theme is different for this page because we've added a few data-theme swatch assigments here to show off how flexible it is. You can add any content or widget to these pages, but we're keeping these simple.

    +

    Back to page "one"

    +
    - +

    Page Footer

    @@ -68,12 +68,12 @@

    Page Footer

    Dialog

    -
    +

    Popup

    -

    I have an id of "popup" on my page container and only look like a dialog because the link to me had a data-rel="dialog" attribute which gives me this inset look and a data-transition="pop" attribute to change the transition to pop. Without this, I'd be styled as a normal page.

    -

    Back to page "one"

    +

    I have an id of "popup" on my page container and only look like a dialog because the link to me had a data-rel="dialog" attribute which gives me this inset look and a data-transition="pop" attribute to change the transition to pop. Without this, I'd be styled as a normal page.

    +

    Back to page "one"

    - +

    Page Footer

    diff --git a/docs/pages/page-anatomy.html b/docs/pages/page-anatomy.html index d0b711555df..7cef951d469 100644 --- a/docs/pages/page-anatomy.html +++ b/docs/pages/page-anatomy.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Anatomy of a Page - + + jQuery Mobile Docs - Anatomy of a Page + - - + +
    @@ -21,80 +21,80 @@

    Anatomy of a Page

    -
    -

    The jQuery Mobile "page" structure is optimized to support either single pages, or local internal linked "pages" within a page.

    - -

    The goal of this model is to allow developers to create websites using best practices — where ordinary links will "just work" without any special configuration — while creating a rich, native-like experience that can't be achieved with standard HTTP requests.

    +
    +

    The jQuery Mobile "page" structure is optimized to support either single pages, or local internal linked "pages" within a page.

    -

    Mobile page structure

    +

    The goal of this model is to allow developers to create websites using best practices — where ordinary links will "just work" without any special configuration — while creating a rich, native-like experience that can't be achieved with standard HTTP requests.

    -

    A jQuery Mobile site must start with an HTML5 'doctype' to take full advantage of all of the framework's features. (Older devices with browsers that don't understand HTML5 will safely ignore the 'doctype' and various custom attributes.) In the 'head', references to jQuery, jQuery Mobile and the mobile theme CSS are all required to start things off. We recommend linking to the files hosted on the jQuery CDN for best performance:

    +

    Mobile page structure

    + +

    A jQuery Mobile site must start with an HTML5 'doctype' to take full advantage of all of the framework's features. (Older devices with browsers that don't understand HTML5 will safely ignore the 'doctype' and various custom attributes.) In the 'head', references to jQuery, jQuery Mobile and the mobile theme CSS are all required to start things off. We recommend linking to the files hosted on the jQuery CDN for best performance:

    
    -<!DOCTYPE html> 
    -<html> 
    -	<head> 
    -	<title>Page Title</title> 
    -	
    -	<meta name="viewport" content="width=device-width, initial-scale=1"> 
    +<!DOCTYPE html>
    +<html>
    +	<head>
    +	<title>Page Title</title>
    +
    +	<meta name="viewport" content="width=device-width, initial-scale=1">
     
     	<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.min.css" />
     	<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.3.min.js"></script>
     	<script type="text/javascript" src="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.min.js"></script>
    -</head> 
    +</head>
     
    -<body> 
    +<body>
     ...content goes here...
     </body>
     </html>
     
    - +

    Viewport meta tag

    Note above that there is a meta viewport tag in the head to specify how the browser should display the page zoom level and dimensions. If this isn't set, many mobile browsers will use a "virtual" page width around 900 pixels to make it work well with exisitng desktop sites but the screens may look zoomed out and too wide. By setting the viewport attributes to content="width=device-width, initial-scale=1, the width will be set to the pixel width of the device screen.

    - +
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    - +

    These settings do not disable the user's ability to zoom the pages which is nice from an accessibility perspective. There is a minor issue in iOS that doesn't properly set the width when changing orientations with these viewport settings, but this will hopefully be fixed a a future release. You can set other viewport values to disable zooming if required since this is part of your page content, not the library.

    - +

    Inside the body: Pages

    -

    Inside the <body> tag, each view or "page" on the mobile device is identified with an element (usually a div) with the data-role="page" attribute:

    +

    Inside the <body> tag, each view or "page" on the mobile device is identified with an element (usually a div) with the data-role="page" attribute:

    -
    -
    <div  data-role="page"> 
    +
    +
    <div  data-role="page">
     	...
    -</div> 
    -
    -
    +</div> +
    +
    -

    Within the "page" container, any valid HTML markup can be used, but for typical pages in jQuery Mobile, the immediate children of a "page" are divs with data-roles of "header", "content", and "footer".

    +

    Within the "page" container, any valid HTML markup can be used, but for typical pages in jQuery Mobile, the immediate children of a "page" are divs with data-roles of "header", "content", and "footer".

    -
    -
    <div data-role="page"> 
    -	<div data-role="header">...</div> 
    -	<div data-role="content">...</div> 
    -	<div data-role="footer">...</div> 
    -</div> 
    -
    -
    +
    +
    <div data-role="page">
    +	<div data-role="header">...</div>
    +	<div data-role="content">...</div>
    +	<div data-role="footer">...</div>
    +</div>
    +
    +
    -

    Putting it together: Basic single page template

    +

    Putting it together: Basic single page template

    Putting it all together, this is the standard boilerplate page template you should start with on a project. :

    
    -<!DOCTYPE html> 
    -<html> 
    -	<head> 
    -	<title>Page Title</title> 
    -	
    -	<meta name="viewport" content="width=device-width, initial-scale=1"> 
    +<!DOCTYPE html>
    +<html>
    +	<head>
    +	<title>Page Title</title>
    +
    +	<meta name="viewport" content="width=device-width, initial-scale=1">
     
     	<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.min.css" />
     	<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.3.min.js"></script>
     	<script type="text/javascript" src="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.min.js"></script>
    -</head> 
    -<body> 
    +</head>
    +<body>
     
     <div data-role="page">
     
    @@ -102,8 +102,8 @@ 

    Putting it together: Basic single page template

    <h1>Page Title</h1> </div><!-- /header --> - <div data-role="content"> - <p>Page content goes here.</p> + <div data-role="content"> + <p>Page content goes here.</p> </div><!-- /content --> <div data-role="footer"> @@ -118,14 +118,14 @@

    Putting it together: Basic single page template

    View boilerplate template -

    Multi-page template structure

    - -

    A single HTML document can contain multiple 'pages' that are loaded together by stacking multiple divs with a data-role of "page". Each 'page' block needs a unique ID (id="foo") that will be used to link internally between 'pages' (href="#foo"). When a link is clicked, the framework will look for an internal 'page' with the ID and transition it into view.

    - -

    Here is an example of a 2 "page" site built with two jQuery Mobile divs navigated by linking to an ID placed on each page wrapper. Note that the IDs on the page wrappers are only needed to support the internal page linking, and are optional if each page is a separate HTML document. Here is what two pages look inside the body element.

    +

    Multi-page template structure

    + +

    A single HTML document can contain multiple 'pages' that are loaded together by stacking multiple divs with a data-role of "page". Each 'page' block needs a unique ID (id="foo") that will be used to link internally between 'pages' (href="#foo"). When a link is clicked, the framework will look for an internal 'page' with the ID and transition it into view.

    + +

    Here is an example of a 2 "page" site built with two jQuery Mobile divs navigated by linking to an ID placed on each page wrapper. Note that the IDs on the page wrappers are only needed to support the internal page linking, and are optional if each page is a separate HTML document. Here is what two pages look inside the body element.

    
    -<body> 
    +<body>
     
     <!-- Start of first page -->
     <div data-role="page" id="foo">
    @@ -134,9 +134,9 @@ 

    Multi-page template structure

    <h1>Foo</h1> </div><!-- /header --> - <div data-role="content"> - <p>I'm first in the source order so I'm shown as the page.</p> - <p>View internal page called <a href="#bar">bar</a></p> + <div data-role="content"> + <p>I'm first in the source order so I'm shown as the page.</p> + <p>View internal page called <a href="#bar">bar</a></p> </div><!-- /content --> <div data-role="footer"> @@ -152,9 +152,9 @@

    Multi-page template structure

    <h1>Bar</h1> </div><!-- /header --> - <div data-role="content"> - <p>I'm first in the source order so I'm shown as the page.</p> - <p><a href="#foo">Back to foo</a></p> + <div data-role="content"> + <p>I'm first in the source order so I'm shown as the page.</p> + <p><a href="#foo">Back to foo</a></p> </div><!-- /content --> <div data-role="footer"> @@ -162,25 +162,25 @@

    Multi-page template structure

    </div><!-- /footer --> </div><!-- /page --> </body> -
    +
    View multi-page template

    - +

    PLEASE NOTE: Since we are using the hash to track navigation history for all the Ajax 'pages', it's not currently possible to deep link to an anchor (index.html#foo) on a page in jQuery Mobile, because the framework will look for a 'page' with an ID of #foo instead of the native behavior of scrolling to the content with that ID.

    - - + +

    Conventions, not requirements

    Although the page structure outlined above is a recommended approach for a standard web app built with jQuery Mobile, the framework is very flexible with document structure. The page, header, content, and footer data-role elements are optional and are mostly helpful for providing some basic formatting and structure. The page wrapper used to be required for auto-initialization to work but this too is now optional for single page documents so there isn't any required markup at all. For a web page with a custom layout, all of these structural elements can be omitted but the Ajax navigation and all widgets will work just like they do in the boilerplate structure. Behind the scenes, the framework will inject the page wrapper if it's not included in the markup because it’s needed for managing pages, but the starting markup can now be extremely simple.

    Note that in a multi-page setup, you are required to have page wrappers in your markup in order to group the content into multiple pages.

    - -
    + +
    @@ -206,7 +206,7 @@

    More in this section

    -
    +
    diff --git a/docs/pages/page-cache.html b/docs/pages/page-cache.html index c988dd6e587..843f06dce74 100644 --- a/docs/pages/page-cache.html +++ b/docs/pages/page-cache.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Prefetching & caching pages - + + jQuery Mobile Docs - Prefetching & caching pages + - - + +
    @@ -21,15 +21,15 @@

    Prefetching & caching pages

    -
    - - +
    + +

    Prefetching pages

    - +

    Usually, it's a good idea to store your app's pages in several single-page templates instead of one large multi-page template. This minimizes the size of the page's DOM.

    When using single-page templates, you can prefetch pages into the DOM so that they're available instantly when the user visits them. To prefetch a page, add the data-prefetch attribute to a link that points to the page. jQuery Mobile then loads the target page in the background after the primary page has loaded and the pagecreate event has triggered. For example:

    - +
    
     <a href="prefetchThisPage.html" data-prefetch> ... </a>
     
    @@ -41,8 +41,8 @@

    Prefetching pages

    
     $.mobile.loadPage( pageUrl );
     
    - -

    Another advantage of prefetching a page is that the user doesn't see the Ajax loading message when visiting the prefetched page. The Ajax loading message only appears if the framework hasn't finished prefetching the page by the time the link is followed.

    + +

    Another advantage of prefetching a page is that the user doesn't see the Ajax loading message when visiting the prefetched page. The Ajax loading message only appears if the framework hasn't finished prefetching the page by the time the link is followed.

    Prefetching pages naturally creates additional HTTP requests and uses bandwidth, so it's wise to use this feature only in situations where it's highly likely that the prefetched page will be visited. A common scenario is a photo gallery, where you can prefetch the "previous" and "next" photo pages so that the user can move quickly between photos.

    @@ -52,7 +52,7 @@

    DOM size management

    For animated page transitions to work, the pages you're transitioning from and to both need to be in the DOM. However, keeping old pages in the DOM quickly fills the browser's memory, and can cause some mobile browsers to slow down or even crash.

    jQuery Mobile therefore has a simple mechanism to keep the DOM tidy. Whenever it loads a page via Ajax, jQuery Mobile flags the page to be removed from the DOM when you navigate away from it later (technically, on the pagehide event). If you revisit a removed page, the browser may be able to retrieve the page's HTML file from its cache. If not, it refetches the file from the server. (In the case of nested list views, jQuery Mobile removes all the pages that make up the nested list once you navigate to a page that's not part of the list.)

    - +

    Pages inside a multi-page template aren't affected by this feature at all - jQuery Mobile only removes pages loaded via Ajax.

    @@ -81,7 +81,7 @@

    Caching pages in the DOM

    The drawback of DOM caching is that the DOM can get very large, resulting in slowdowns and memory issues on some devices. If you enable DOM caching, take care to manage the DOM yourself and test thoroughly on a range of devices.

    -
    +
    @@ -107,7 +107,7 @@

    More in this section

    -
    + diff --git a/docs/pages/page-dialogs.html b/docs/pages/page-dialogs.html index a5f5f7f710d..6c4def26d46 100755 --- a/docs/pages/page-dialogs.html +++ b/docs/pages/page-dialogs.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Dialogs - + + jQuery Mobile Docs - Dialogs + - - + +
    @@ -30,45 +30,45 @@

    Creating dialogs

    <a href="foo.html" data-rel="dialog">Open dialog</a>

    - + Open dialog - - + +

    Transitions

    By default, the dialog will open with a 'pop' transition. Like all pages, you can specify any page transition you want on the dialog by adding the data-transition attribute to the link. To make it feel more dialog-like, we recommend specifying a transition of "pop", "slideup" or "flip".

    - + <a href="foo.html" data-rel="dialog" data-transition="pop">Open dialog</a> - + - - + +

    Closing dialogs

    When any link is clicked within in a dialog, the framework will automatically close the dialog and transition to the requested page, just as if the dialog were a normal page. To create a "cancel" button in a dialog, just link to the page that triggered the dialog to open and add the data-rel="back" attribute to your link. This pattern of linking to the previous page is also usable in non-JS devices as well.

    For JavaScript-generated links, you can simply set the href attribute to "#" and use the data-rel="back" attribute. You can also call the dialog's close() method to programmatically close dialogs, for example: $('.ui-dialog').dialog('close').

    - +

    Setting the close button text

    Just like the page plugin, you can set a dialog's close button text through option or data attribute. The option can be configured for all dialogs by binding to the mobileinit event and setting the $.mobile.dialog.prototype.options.closeBtnText property to a string of your choosing, or you can place the data attribute data-close-btn-text to configure the text from your markup.

    - +

    History & Back button behavior

    Since dialogs are typically used to support actions within a page, the framework does not include dialogs in the hash state history tracking. This means that dialogs will not appear in your browsing history chronology when the Back button is clicked. For example, if you are on a page, click a link to open a dialog, close the dialog, then navigate to another page, if you were to click the browser's Back button at that point you will navigate back to the first page, not the dialog.

    - +

    Styling & theming

    Dialogs can be styled with different themes, just like any page. Here is a different dialog design:

    An alternate color scheme - - + +

    And dialogs can be can used more like a control sheet to offer multiple buttons by removing the header:

    Share photos... - - -
    + + +
    @@ -94,7 +94,7 @@

    More in this section

    - + diff --git a/docs/pages/page-links.html b/docs/pages/page-links.html index aff117dff33..6fb699e71a7 100755 --- a/docs/pages/page-links.html +++ b/docs/pages/page-links.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Linking Pages - + + jQuery Mobile Docs - Linking Pages + - - + +
    @@ -21,61 +21,61 @@

    Linking pages

    -
    +

    Linking pages

    - -

    jQuery Mobile is designed to work with simple page linking conventions. Essentially, you can link pages and assets as you normally would, and jQuery Mobile will automatically handle page requests in a single-page model, using Ajax when possible. When Ajax isn't possible (such as a non-same-domain url, or if specified using certain attributes on the link), a normal http request is used instead.

    -

    The goal of this model is to allow developers to create websites using best practices — where ordinary links will "just work" without any special configuration — while creating a rich, native-like experience that can't be achieved with standard HTTP requests.

    - -

    Default link behavior: Ajax

    - +

    jQuery Mobile is designed to work with simple page linking conventions. Essentially, you can link pages and assets as you normally would, and jQuery Mobile will automatically handle page requests in a single-page model, using Ajax when possible. When Ajax isn't possible (such as a non-same-domain url, or if specified using certain attributes on the link), a normal http request is used instead.

    + +

    The goal of this model is to allow developers to create websites using best practices — where ordinary links will "just work" without any special configuration — while creating a rich, native-like experience that can't be achieved with standard HTTP requests.

    + +

    Default link behavior: Ajax

    +

    To enable animated page transitions, all links that point to an external page (ex. products.html) will be loaded via Ajax. To do this unobtrusively, the framework parses the link's href to formulate an Ajax request (Hijax) and displays the loading spinner. All this happens automatically by jQuery Mobile.

    - +

    If the Ajax request is successful, the new page content is added to the DOM, all mobile widgets are auto-initialized, then the new page is animated into view with a page transition.

    - +

    If the Ajax request fails, the framework will display a small error message overlay (styled in the "e" swatch) that disappears after a brief time so this doesn't break the navigation flow. View an example of the error message.

    Linking without Ajax

    - +

    Links that point to other domains or that have rel="external", data-ajax="false" or target attributes will not be loaded with Ajax. Instead, these links and will cause a full page refresh with no animated transition. Both attributes have the same effect, but different semanic meaning. rel="external" should be used when linking to another site or domain, while data-ajax="false" is useful for simply opting a page within your domain from being loaded via Ajax. Because of security restrictions, the framework always opts links to external domains out of the Ajax behavior.

    - -

    Linking within a multi-page document

    - -

    A single HTML document can contain or multiple 'page' containers simply be stacking multiple divs with a data-role of "page". This allows you to build a small site or application within a single HTML document; jQuery Mobile will simply display the first 'page' it finds in the source order when the page loads.

    - + +

    Linking within a multi-page document

    + +

    A single HTML document can contain or multiple 'page' containers simply be stacking multiple divs with a data-role of "page". This allows you to build a small site or application within a single HTML document; jQuery Mobile will simply display the first 'page' it finds in the source order when the page loads.

    +

    If a link in a multi-page document points to an anchor (#foo), the framework will looks for a page wrapper with that ID (id="foo"). If it finds a page in the HTML document, it will transition the new page into view. You can seamlessly navigate between local, internal "pages" and external pages in jQuery Mobile. Both will look the same to the end user except that external pages will display the Ajax spinner while loading. In either situation, jQuery Mobile updates the page's URL hash to enable Back button support, deep-linking and bookmarking.

    - +

    It's important to note if you are linking from a mobile page that was loaded via Ajax to a page that contains multiple internal pages, you need to add a rel="external" or data-ajax="false" to the link. This tells the framework to do a full page reload to clear out the Ajax hash in the URL. This is critical because Ajax pages use the hash (#) to track the Ajax history, while multiple internal pages use the hash to indicate internal pages so there will be conflicts in the hash between these two modes.

    - +

    For example, a link to a page containing multiple internal pages would look like this:

    - + <a href="multipage.html" rel="external">Multi-page link</a> - +

    "Back" button links

    If you use the attribute data-rel="back" on an anchor, any clicks on that anchor will mimic the back button, going back one history entry and ignoring the anchor's default href. This is particularly useful when linking back to a named page, such as a link that says "home", or when generating "back" buttons with JavaScript, such as a button to close a dialog. When using this feature in your source markup, be sure to provide a meaningful href that actually points to the URL of the referring page (this will allow the feature to work for users in C-Grade browsers. Also, please keep in mind that if you just want a reverse transition without actually going back in history, you should use the data-direction="reverse" attribute instead.

    - - + +

    Redirects and linking to directories

    - +

    When linking to directory indexes (such as href="typesofcats/" instead of href="typesofcats/index.html"), you must provide a trailing slash. This is because jQuery Mobile assumes the section after the last "/" character in a url is a filename, and it will remove that section when creating base urls from which future pages will be referenced.

    - +

    However, you can work around this issue by returning your page div with a data-url attribute already specified. When you do this, jQuery Mobile will use that attribute's value for updating the URL, instead of the url used to request that page. This also allows you to return urls that change as the result of a redirect, for example, you might post a form to "/login.html" but return a page from the url "/account" after a successful submission. This tool allows you to take control of the jQuery Mobile history stack in these situations. Here's an example:

    - +

    The following link points to "docs-links-urltest/index.html": Test Link which is a directory with an index page. The return page will update the hash as "/docs/pages/docs-links-urltest/" with a trailing slash. This is done via the data-url attribute in that page's source. Keep in mind that the value will replace the entire hash, and it is up to you to replace it with a URL that actually resolves to the correct page when requested via refresh or deep link.

    - +

    Learn more about the technical details of the navigation model and Ajax, hashes and history in jQuery mobile.

    - - - + + +

    Link examples

    All standard HTML link types are supported in jQuery Mobile in addition to the types outlined above. Here is a sampler of many common link types:

    - + - -
    + +
    @@ -122,7 +122,7 @@

    More in this section

    -
    + diff --git a/docs/pages/page-scripting.html b/docs/pages/page-scripting.html index ce70fb55188..3dfdf2337b4 100644 --- a/docs/pages/page-scripting.html +++ b/docs/pages/page-scripting.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Scripting pages - + + jQuery Mobile Docs - Scripting pages + - - + +
    @@ -21,17 +21,17 @@

    Scripting pages

    -
    -

    Since jQuery Mobile uses an Ajax-powered navigation system, there are a few helpful things to know when writing scripts that interact with the page and navigation model. You can explore the mobile API in more detail by reading up on global configuration options, events, and methods or dig into the technical details of the Ajax navigation model.

    - -

    Scripts & styles in the head

    - +
    +

    Since jQuery Mobile uses an Ajax-powered navigation system, there are a few helpful things to know when writing scripts that interact with the page and navigation model. You can explore the mobile API in more detail by reading up on global configuration options, events, and methods or dig into the technical details of the Ajax navigation model.

    + +

    Scripts & styles in the head

    +

    When you click a link in jQuery Mobile, the Ajax navigation system uses the link's href to formulate an Ajax request. Although the full page is loaded with Ajax, the framework only pulls in the contents of the page, and ignores anything in the head except for title tag contents.

    This means that any scripts or styles in the head of the page won't have any effect when the page is loaded via Ajax. The same page will work as expected if you were to load a page directly but both scenarios need to be considered. The reason that the head is ignored for Ajax page content: it's just too complex. The framework would need to compare and reconcile the contents of multiple page head elements as they are loaded into the DOM so we leave this task to the developer.

    - +

    The simplest approach is to add the same set of stylesheets and scripts into all your pages. If you need to load in specific scripts or styles for a particular page, bind to the pagecreate event (details below) to run the necessary code when a specific page ID is created. Following this approach will ensure that the code executes if the page is loaded directly or is pulled in and shown via Ajax.

    - -

    pagecreate = DOM ready

    + +

    pagecreate = DOM ready

    The first thing you learn in jQuery is to call code inside the $(document).ready() function so everything will execute as soon as the DOM is loaded. However, in jQuery Mobile, Ajax is used to load the contents of each page into the DOM as you navigate, and the DOM ready handler only executes for the first page. To execute code whenever a new page is loaded and created by the Ajax navigation system, you must bind to the pagecreate event.

    The pagecreate event is triggered on the page being initialized, right after initialization occurs. We recommend binding to this event instead of DOM ready() because this will work regardless of whether the page is loaded directly or if the content is pulled into another page as part of the Ajax navigation system.

    @@ -41,53 +41,53 @@

    pagecreate = DOM ready

    }); -

    Changing pages

    +

    Changing pages

    If you need to change the current page with JavaScript, use the changePage method. There are a lot of methods and properties that you can set when changing pages, but here are two simple examples:

    
    -//transition to the "about us" page with a slideup transition 			
    -$.mobile.changePage( "about/us.html", { transition: "slideup"} );	
    +//transition to the "about us" page with a slideup transition
    +$.mobile.changePage( "about/us.html", { transition: "slideup"} );
     
    -//transition to the "search results" page, using data from a form with an ID of "search"" 		
    +//transition to the "search results" page, using data from a form with an ID of "search"" 	
     $.mobile.changePage( "searchresults.php", {
    -	type: "post", 
    +	type: "post",
     	data: $("form#search").serialize()
    -});		
    +});
     
    -

    Loading pages

    +

    Loading pages

    To load an external page, enhance its content, and insert it into the DOM, use the loadPage method. There are a lot of methods and properties that you can set when loading pages, but here is a simple example:

    
    -//load the "about us" page into the DOM			
    -$.mobile.loadPage( "about/us.html" );	
    +//load the "about us" page into the DOM
    +$.mobile.loadPage( "about/us.html" );
     
    -

    Enhancing new markup

    -

    The page plugin dispatches a “pagecreate” event, which most widgets use to auto-initialize themselves. As long as a widget plugin script is referenced, it will automatically enhance any instances of the widgets it finds on the page.

    -

    However, if you generate new markup client-side or load in content via Ajax and inject it into a page, you can trigger the create event to handle the auto-initialization for all the plugins contained within the new markup. This can be triggered on any element (even the page div itself), saving you the task of manually initializing each plugin (listview button, select, etc.).

    -

    For example, if a block of HTML markup (say a login form) was loaded in through Ajax, trigger the create event to automatically transform all the widgets it contains (inputs and buttons in this case) into the enhanced versions. The code for this scenario would be:

    +

    Enhancing new markup

    +

    The page plugin dispatches a “pagecreate” event, which most widgets use to auto-initialize themselves. As long as a widget plugin script is referenced, it will automatically enhance any instances of the widgets it finds on the page.

    +

    However, if you generate new markup client-side or load in content via Ajax and inject it into a page, you can trigger the create event to handle the auto-initialization for all the plugins contained within the new markup. This can be triggered on any element (even the page div itself), saving you the task of manually initializing each plugin (listview button, select, etc.).

    +

    For example, if a block of HTML markup (say a login form) was loaded in through Ajax, trigger the create event to automatically transform all the widgets it contains (inputs and buttons in this case) into the enhanced versions. The code for this scenario would be:

    $( ...new markup that contains widgets... ).appendTo( ".ui-page" ).trigger( "create" );
    -
    + -

    Create vs. refresh: An important distinction

    -

    Note that there is an important difference between the create event and refresh method that some widgets have. The create event is suited for enhancing raw markup that contains one or more widgets. The refresh method should be used on existing (already enhanced) widgets that have been manipulated programmatically and need the UI be updated to match.

    +

    Create vs. refresh: An important distinction

    +

    Note that there is an important difference between the create event and refresh method that some widgets have. The create event is suited for enhancing raw markup that contains one or more widgets. The refresh method should be used on existing (already enhanced) widgets that have been manipulated programmatically and need the UI be updated to match.

    For example, if you had a page where you dynamically appended a new unordered list with data-role=listview attribute after page creation, triggering create on a parent element of that list would transform it into a listview styled widget. If more list items were then programmatically added, calling the listview’s refresh method would update just those new list items to the enhanced state and leave the existing list items untouched.

    -

    Scrolling to a position within a page

    +

    Scrolling to a position within a page

    Since we use the URL hash to preserve Back button behavior, using page anchors to jump down to a position on the page isn't supported by using the traditional anchor link (#foo). Use the silentScroll method to scroll to a particular Y position without triggering scroll event listeners. You can pass in a yPos arguments to scroll to that Y location. For example:

    
    -//scroll to Y 300px 			
    -$.mobile.silentScroll(300);	
    -
    - -

    Binding to mouse and touch events

    +//scroll to Y 300px +$.mobile.silentScroll(300); + + +

    Binding to mouse and touch events

    One inportant consideration in mobile is handling mouse and touch events. These events differ significantly across mobile platforms, but the common denominator is that click events will work everywhere, but usually after a significant delay of 500-700ms. This delay is necessary for the browser to wait for double tap, scroll and extended hold tap events to potentially occur. To avoid this delay, it's possible to bind to touch events (ex. touchstart) but the issue with this approach is that some mobile platforms (WP7, Blackberry) don't support touch. To compound this issue, some platforms will emit both touch and mouse events so if you bind to both types, duplicate events will be fired for a single interaction.

    Our solution is to create a set of virtual events that normalize mouse and touch events. This allows the developer to register listeners for the basic mouse events, such as mousedown, mousemove, mouseup, and click, and the plugin will take care of registering the correct listeners behind the scenes to invoke the listener at the fastest possible time for that device. This still retains the order of event firing in the traditional mouse environment, should multiple handlers be registered on the same element for different events. The virtual mouse system exposes the following virtual events to jQuery bind methods: vmouseover, vmousedown, vmousemove, vmouseup, vclick, and vmousecancel

    - -
    + +
    @@ -113,7 +113,7 @@

    More in this section

    -
    + diff --git a/docs/pages/page-template.html b/docs/pages/page-template.html index 4b69b5c9f55..0485bd86780 100755 --- a/docs/pages/page-template.html +++ b/docs/pages/page-template.html @@ -1,16 +1,16 @@ - - + + - - Page Title + + Page Title - + - +
    @@ -18,16 +18,16 @@

    Single page

    -
    -

    This is a single page boilerplate template that you can copy to build you first jQuery Mobile page. Each link or form from here will pull a new page in via Ajax to support the animated page transitions.

    +
    +

    This is a single page boilerplate template that you can copy to build you first jQuery Mobile page. Each link or form from here will pull a new page in via Ajax to support the animated page transitions.

    Just view the source and copy the code to get started. All the CSS and JS is linked to the jQuery CDN versions so this is super easy to set up. Remember to include a meta viewport tag in the head to set the zoom level.

    This template is standard HTML document with a single "page" container inside, unlike a multi-page template that has multiple pages within it. We strongly recommend building your site or app as a series of separate pages like this because it's cleaner, more lightweight and works better without JavaScript.

    - +

    Footer content

    - +
    diff --git a/docs/pages/page-titles.html b/docs/pages/page-titles.html index f02be70b982..b3835c5c4b5 100644 --- a/docs/pages/page-titles.html +++ b/docs/pages/page-titles.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Page titles - + + jQuery Mobile Docs - Page titles + - - + +
    @@ -21,17 +21,17 @@

    Page titles

    -
    - +
    +

    Titles in Ajax navigation

    - +

    When you load the first page of a jQuery Mobile based site, then click a link or submit a form, the jQuery Mobile uses Ajax to pull in the content of the requested page. Having both pages in the DOM is essential to enable the animated page transitions, but one downside of this approach is that the page title is always that of the first page, not the subsequent page you’re viewing.

    -

    To remedy this, jQuery Mobile automatically parses the title of the page pulled via Ajax and changes the title attribute of the parent document to match.

    - +

    To remedy this, jQuery Mobile automatically parses the title of the page pulled via Ajax and changes the title attribute of the parent document to match.

    +

    Titles in multi-page templates

    - +

    On multi-page documents, we follow a similiar convention, but since all the page share a common title, we have a data-title attribute that can be added each page container within a multi-page template to manually define a title. The title of the HTML docuemnt will be automatically updated to match the data-title of the page currently in view.

    - +
    
     <div data-role="page" id="foo" data-title="Page Foo">
     
    @@ -39,7 +39,7 @@ 

    Titles in multi-page templates

    -
    +
    @@ -65,7 +65,7 @@

    More in this section

    -
    + diff --git a/docs/pages/page-transitions.html b/docs/pages/page-transitions.html index a9c8376686b..9de84b5c63d 100755 --- a/docs/pages/page-transitions.html +++ b/docs/pages/page-transitions.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Transitions - + + jQuery Mobile Docs - Transitions + - - + +
    @@ -21,8 +21,8 @@

    Transitions

    -
    -

    Page transitions

    +
    +

    Page transitions

    The jQuery Mobile framework includes a set of six CSS-based transition effects that can be applied to any object or page change event, which apply the chosen transition when navigating to a new page and the reverse transition for the Back button. By default, the framework applies the right to left slide transition.

    @@ -40,16 +40,16 @@

    Page transitions

    fade flip *

    - +

    NOTE: The flip transition isn't rendered correctly on most versions of Android because it lacks 3D CSS transform capabilities. Unfortunately, instead of ignoring the flip, Android makes the page "cartwheel" away by rotating instead of flipping. We recommend using this transition sparingly until support improves.

    In addition, you can also force a "backwards" transition by specifying data-direction="reverse" on your link. Note: (this was formerly data-back="true", which will remain supported until 1.0)

    - +

    Transitions from jQtouch (with small modifications): Built by David Kaneda and maintained by Jonathan Stark.

    - -
    + +
    @@ -75,7 +75,7 @@

    More in this section

    -
    + @@ -84,11 +84,11 @@

    More in this section

    - - - - - + + + + +
    @@ -99,7 +99,7 @@

    Ta-da!

    That was an animated page transition effect that we added with a data-transition attribute on the link.

    Since it uses CSS transforms, this should be hardware accelerated on many mobile devices.

    What do you think?

    - I like it + I like it
    diff --git a/docs/pages/pages-themes.html b/docs/pages/pages-themes.html index 20da8f2581a..66556bd4561 100755 --- a/docs/pages/pages-themes.html +++ b/docs/pages/pages-themes.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Theming Pages - + + jQuery Mobile Docs - Theming Pages + - - + +
    @@ -21,15 +21,15 @@

    Theming pages

    -
    +

    Page Theming

    - +

    jQuery Mobile has a rich theming system that gives you full control of how pages are styled. There is detailed theming documentation within each page widget, but let's look at a few high-level examples of how theming is applied.

    - +

    The data-theme attribute can be applied to the header and footer containers to apply any of the lettered theme color swatches. While the data-theme attribute could be added to the content container, we recommend adding it instead to div or container that has been assigned the data-role="page" attribute to ensure that the background color is applied to the full page.

    - +

    The default Theme mixes styles from multiple swatches to create visual texture and present the various elements in optimal contrast to one another:

    - +

    Default Theme

    @@ -60,9 +60,9 @@

    Default Theme Content Header

    - +

    And each of the five "swatches" applies its style consistently across all page elements, as shown below:

    - +

    Swatch A

    Header A

    @@ -111,7 +111,7 @@

    Header

    ButtonButtonButton
    - +

    Swatch C

    Header C

    @@ -135,7 +135,7 @@

    Header

    ButtonButtonButton
    - +

    Swatch D

    Header D

    @@ -159,7 +159,7 @@

    Header

    ButtonButtonButton
    - +

    Swatch E

    Header E

    @@ -185,7 +185,7 @@

    Header

    - +
    @@ -211,7 +211,7 @@

    More in this section

    - + diff --git a/docs/pages/transition-success.html b/docs/pages/transition-success.html index 61897b58655..6359880d7ff 100644 --- a/docs/pages/transition-success.html +++ b/docs/pages/transition-success.html @@ -1,29 +1,29 @@ - - + + - - jQuery Mobile Framework - Dialog Example - + + jQuery Mobile Framework - Dialog Example + - - + +

    Ta-da!

    - +

    That was an animated page transition effect that we added with a data-transition attribute on the link.

    Since it uses CSS transforms, this should be hardware accelerated on many mobile devices.

    What do you think?

    - I like it + I like it
    diff --git a/docs/toolbars/api-bars.html b/docs/toolbars/api-bars.html index fcccd05ee85..4206a662d15 100755 --- a/docs/toolbars/api-bars.html +++ b/docs/toolbars/api-bars.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Toolbars API - + + jQuery Mobile Docs - Toolbars API + - - + +
    @@ -20,19 +20,19 @@

    Toolbar API

    - +

    Dependencies

    To be documented

    - +

    Options

    To be documented

    - +

    Methods

    To be documented

    - +

    Known Issues

    To be documented

    - +
    diff --git a/docs/toolbars/bars-fixed.html b/docs/toolbars/bars-fixed.html index 29263cd037b..da65092d356 100755 --- a/docs/toolbars/bars-fixed.html +++ b/docs/toolbars/bars-fixed.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Framework - Fixed Toolbars - + + jQuery Mobile Framework - Fixed Toolbars + - - + +
    @@ -20,31 +20,31 @@

    Fixed toolbars

    Home
    - +

    Fixed toolbars will re-appear after you scroll

    This is a demo of the "fixed" headers and footers used in the jQuery Mobile framework. The page content flows naturally, allowing us to take advantage of native scrolling instead of a scripting a faux-scrolling workaround. The header and footer divs are right in the flow of the document, but whenever they are out of view, you can tap the screen to make them appear. Tapping again or scrolling the page will cause them to appear back in the flow of the page (at the top and bottom).

    To set this behavior on a header or footer, add the data-position="fixed" attribute to the toolbar container.

    - +
    
     <div data-role="header" data-position="fixed">
     	<h1>Fixed toolbars</h1>
     </div>
    -
    + + + + - - -

    Some text to make the page very long

    - +

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.Donec non enim in turpis pulvinar facilisis. Ut felis.

    - +

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.Donec non enim in turpis pulvinar facilisis. Ut felis.

    - - + +

    And an inset list

    - + - +

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.Donec non enim in turpis pulvinar facilisis. Ut felis.

    - +

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.Donec non enim in turpis pulvinar facilisis. Ut felis.

    - - + +

    Embedded form

    - +
    @@ -105,15 +105,15 @@

    Embedded form

    - +

    A bit more text

    - +

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.Donec non enim in turpis pulvinar facilisis. Ut felis.

    - -
    + +
    @@ -135,7 +135,7 @@

    More in this section

    - + diff --git a/docs/toolbars/bars-fullscreen.html b/docs/toolbars/bars-fullscreen.html index a59562c4012..fcc81b2d477 100755 --- a/docs/toolbars/bars-fullscreen.html +++ b/docs/toolbars/bars-fullscreen.html @@ -1,37 +1,37 @@ - - + + - - jQuery Mobile Framework - Fullscreen Fixed toolbars - + + jQuery Mobile Framework - Fullscreen Fixed toolbars + - - + +
    - +

    Fullscreen fixed header

    Home
    - +
    Photo Run - +

    This page demonstrates the "fullscreen" toolbar mode. This toolbar treatment is used in special cases where you want the content to fill the whole screen, and you want the header and footer toolbars to appear and disappear when the page is clicked responsively — a common scenario for photo, image or video viewers.

    - +

    To enable this toolbar feature type, you apply a data-fullscreen="true" attribute to the div contain that has the attribute data-role="page", and the data-position="fixed" attribute to both the header and footer div elements.

    - +

    Keep in mind that the toolbars in this mode will sit over page content, so not all content will be accessible with the toolbars open, just as shown in this demo.

    - -
    + +
    @@ -53,7 +53,7 @@

    More in this section

    -
    + diff --git a/docs/toolbars/bars-themes.html b/docs/toolbars/bars-themes.html index c7027bdb1b4..966ca781c5a 100644 --- a/docs/toolbars/bars-themes.html +++ b/docs/toolbars/bars-themes.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Framework - Theming Toolbars - + + jQuery Mobile Framework - Theming Toolbars + - - + +
    @@ -19,47 +19,47 @@

    Bar theming

    Home
    - +
    -
    +

    Both the header and footer bars will be styled by default with the theme's "a" color swatch (black in the default theme) because these bars are typically primary in the visual hierarchy of a page.

    - - + +

    Theming headers and footers

    -

    To set the header or footer bars to a different color in your theme, add the data-theme attribute and specify the letter of the theme swatch (a, b, c, etc.). For example, this will set the bar to swatch "b" (blue in the default theme):

    +

    To set the header or footer bars to a different color in your theme, add the data-theme attribute and specify the letter of the theme swatch (a, b, c, etc.). For example, this will set the bar to swatch "b" (blue in the default theme):

    -
    +
    -<div  data-role="header"  data-theme="b"> 
    -	<h1>Page Title</h1> 
    -</div> 
    -
    +<div data-role="header" data-theme="b"> + <h1>Page Title</h1> +</div> +
    - +

    Theming buttons in toolbars

    -

    Any link added inside the header block will be automatically styled as a button that matches the color of the bar's theme swatch. To make a button stand out as a primary call to action, the data-theme attribute can be used to specify a contrasting button color from a different theme swatch. For example, if we set the header to theme "c" (light gray), both buttons would be styled as the "c" button by default. If we wanted the Save button to visually pop, we can override the color by setting the data-theme attribute to "b" (blue in our default theme) on the Save button's anchor.

    +

    Any link added inside the header block will be automatically styled as a button that matches the color of the bar's theme swatch. To make a button stand out as a primary call to action, the data-theme attribute can be used to specify a contrasting button color from a different theme swatch. For example, if we set the header to theme "c" (light gray), both buttons would be styled as the "c" button by default. If we wanted the Save button to visually pop, we can override the color by setting the data-theme attribute to "b" (blue in our default theme) on the Save button's anchor.

    -
    +
    -<a href="add-user.php"  data-theme="b">Save</a> 
    -
    -
    - +<a href="add-user.php" data-theme="b">Save</a> + +
    + + -

    Theme variations

    This is a demo of the variation that can be achieved by tweaking the theme swatches and buttons inside the headers and footers.

    Headers

    - +

    Bar theme "a"

    New
    - +
    Cancel

    Bar theme "a"

    @@ -101,37 +101,37 @@

    Bar theme "d"

    Footers

    These are examples of a footer with link buttons inside.

    - - + + - + - + - + - +
    left right @@ -140,7 +140,7 @@

    Footers

    -
    +
    @@ -162,7 +162,7 @@

    More in this section

    -
    +
    diff --git a/docs/toolbars/docs-bars.html b/docs/toolbars/docs-bars.html index baf229df2b4..602a62a2a33 100755 --- a/docs/toolbars/docs-bars.html +++ b/docs/toolbars/docs-bars.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Toolbar Basics - + + jQuery Mobile Docs - Toolbar Basics + - - + +
    @@ -21,32 +21,32 @@

    Toolbar basics

    -
    +

    Toolbar types

    - +

    In jQuery Mobile, there are two standard types of toolbars: Headers and Footers.

    - +
    • The Header bar serves as the page title, is usually the first element inside each mobile page, and typically contains a page title and up to two buttons.
    • -
    • The Footer bar is usually the last element inside each mobile page, and tends to be more freeform than the header in terms of content and functionality, but typically contains a combination of text and buttons.
    • -
    +
  • The Footer bar is usually the last element inside each mobile page, and tends to be more freeform than the header in terms of content and functionality, but typically contains a combination of text and buttons.
  • +

    It's very common to have a horizontal navigation or tab bar inside the header an/or footer; jQuery Mobile includes a nav bar widget that turns an unordered list of links into a horizontal button bar, which works well in these instances.

    - +

    Toolbar positioning options

    - +

    Header and footers can be positioned on the page in a few different ways. By default, the toolbars use the "inline" positioning mode. In this mode, the headers and footer sit in the natural document flow (the default HTML behavior), which ensures that they are visible on all devices, regardless of JavaScript and CSS positioning support.

    - +

    A "fixed" positioning mode provides the convenience of static toolbars without the drawbacks of implementing faux-scrolling in JavaScript. The toolbars start in their natural positions on the page, like the "inline" mode, but when a bar scrolls out of the viewport, the framework animates the bar back into view by dynamically re-positioning the bar to the top or bottom of the viewport.

    At any time, tapping the screen will toggle the visibility of the fixed toolbars: tapping the page when the toolbars aren't visible brings them into view, tapping again hides them until you tap again. This gives users the option to hide the toolbars until needed to maximize screen real estate.

    To set this behavior on a header or footer, add the data-position="fixed" attribute to the toolbar container.

    - +

    A "fullscreen" position mode works just like the fixed mode except that the toolbars aren't shown at the top and bottom of the page and only appear when the page is clicked. This is useful for immersive apps like photo or video viewers where you want the content to full when whole screen and toolbars can be summoned to appear by tapping the screen. Keep in mind that the toolbars in this mode will sit over page content so this is best used for specific situations.

    - -
    + +
    @@ -68,7 +68,7 @@

    More in this section

    -
    + diff --git a/docs/toolbars/docs-footers.html b/docs/toolbars/docs-footers.html index 52cbd8d62b4..bc1b82e90d6 100755 --- a/docs/toolbars/docs-footers.html +++ b/docs/toolbars/docs-footers.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Footer Configuration - + + jQuery Mobile Docs - Footer Configuration + - - + +
    @@ -21,36 +21,36 @@

    Footer configuration

    -
    +

    Footer bar structure

    -

    The footer bar has the same basic structure as the header except it uses the data-role attribute value of footer.

    +

    The footer bar has the same basic structure as the header except it uses the data-role attribute value of footer.

    -
    +
    -<div  data-role="footer"> 
    -	<h4>Footer content</h4> 
    -</div> 
    -
    +<div data-role="footer"> + <h4>Footer content</h4> +</div> +
    - - -

    The footer toolbar will be be themed with the "a" swatch by default (black in the default theme) but you can easily set the theme swatch color.

    - + + +

    The footer toolbar will be be themed with the "a" swatch by default (black in the default theme) but you can easily set the theme swatch color.

    +

    Footer content

    - -

    The page footer is very similar to the header in terms of options and configuration. The primary differences are that the footer is designed to be less structured than the header to allow for more flexibility, so the framework doesn't automatically place buttons to the left or right based on source order as it does in the header.

    + +

    The page footer is very similar to the header in terms of options and configuration. The primary differences are that the footer is designed to be less structured than the header to allow for more flexibility, so the framework doesn't automatically place buttons to the left or right based on source order as it does in the header.

    Adding buttons

    Any link or valid button markup added to the footer will automatically be turned into a button. To save space, buttons in toolbars are automatically set to inline styling so the button is only as wide as the text and icons it contains.

    - +

    By default, toolbars don't have any padding to accommodate nav bars and other widgets. To include padding on the bar, add a class="ui-bar" to the footer.

    - +
    
     <div data-role="footer" class="ui-bar">
    @@ -70,9 +70,9 @@ 

    Adding buttons

    Up Down
    - +

    To group buttons together into a button set, wrap the links in a wrapper with data-role="controlgroup" and data-type="horizontal" attributes.

    - + <div data-role="controlgroup" data-type="horizontal">

    This creates a grouped set of buttons:

    @@ -85,13 +85,13 @@

    Adding buttons

    Down
    - - - + + +

    Adding form elements

    Form elements and other content can also be added to toolbars. Here is an example of a select menu inside a footer bar:

    - +
    @@ -102,22 +102,22 @@

    Adding form elements

    - - - + + +

    Persistent footers

    -

    In situations where the footer is a global navigation element, you may want it to appear fixed in place between page transitions. This can be accomplished by using the persistent footer feature included in jQuery Mobile.

    - +

    In situations where the footer is a global navigation element, you may want it to appear fixed in place between page transitions. This can be accomplished by using the persistent footer feature included in jQuery Mobile.

    +

    To make a footer stay in place between transitions, add the data-id attribute to the footer of all relevant pages and use the same id value for each. For example, by adding data-id="myfooter" to the current page and the target page, the framework will keep the footer anchors in the same spot during the page animation. PLEASE NOTE: This effect will only work correctly if the header and footer toolbars are set to data-position="fixed" so they are in view during the transition.

    - - - -
    + + + +
    @@ -139,7 +139,7 @@

    More in this section

    - + diff --git a/docs/toolbars/docs-headers.html b/docs/toolbars/docs-headers.html index 1324f7ddd4e..9c57b44f6ca 100644 --- a/docs/toolbars/docs-headers.html +++ b/docs/toolbars/docs-headers.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Header Bars - + + jQuery Mobile Docs - Header Bars + - - + +
    @@ -21,120 +21,120 @@

    Header bars

    -
    +

    Header structure

    -

    The header is a toolbar at the top of the page that usually contains the page title text and optional buttons positioned to the the left and/or right of the title for navigation or actions.

    - -

    The title text is normally an H1 heading element but it's possible to use any heading level (H1-H6) to allow for semantic flexibility. For example, a page containing multiple mobile 'pages' may use a H1 element on the home 'page' and a H2 element on the secondary pages. All heading levels are styled identically by default to maintain visual consistency.

    +

    The header is a toolbar at the top of the page that usually contains the page title text and optional buttons positioned to the the left and/or right of the title for navigation or actions.

    -
    +

    The title text is normally an H1 heading element but it's possible to use any heading level (H1-H6) to allow for semantic flexibility. For example, a page containing multiple mobile 'pages' may use a H1 element on the home 'page' and a H2 element on the secondary pages. All heading levels are styled identically by default to maintain visual consistency.

    + +
    -<div  data-role="header"> 
    -	<h1>Page Title</h1> 
    -</div> 
    -
    -
    +<div data-role="header"> + <h1>Page Title</h1> +</div> + +

    Default header features

    -

    The header toolbar is themed with the "a" swatch by default (black in the default theme) but you can easily set the theme swatch color.

    +

    The header toolbar is themed with the "a" swatch by default (black in the default theme) but you can easily set the theme swatch color.

    + -

    Page title

    - +

    Adding buttons

    - - - - - + + + + +

    In the standard header configuration, there are slots for buttons on either side of the text heading. Each button is typically an anchor element, but any valid button markup will work. To save space, buttons in toolbars are set to inline styling so the button is only as wide as the text and icons it contains.

    - - + +

    Default button positioning

    - -

    The header plugin looks for immediate children of the header container, and automatically sets the first link in the left button slot and the second link in the right. In this example, the 'Cancel' button will appear in the left slot and 'Save' will appear in the right slot based on their sequence in the source order.

    - -
    			
    +			

    The header plugin looks for immediate children of the header container, and automatically sets the first link in the left button slot and the second link in the right. In this example, the 'Cancel' button will appear in the left slot and 'Save' will appear in the right slot based on their sequence in the source order.

    + + +
    
     <div data-role="header" data-position="inline">
     	<a href="index.html" data-icon="delete">Cancel</a>
     	<h1>Edit Contact</h1>
     	<a href="index.html" data-icon="check">Save</a>
     </div>
     
    - - + +
    Cancel

    Edit Contact

    Save

    Buttons automatically adopt the swatch color of the bar they sit in, so a link in a header bar with the "a" color will also be styled as "a" colored buttons. It's simple to make a button visually stand out — here, we add the data-theme attribute and set the color swatch for the button to "b" to make the "Save" button pop.

    - -
    			
    +
    +			
    
     <div data-role="header" data-position="inline">
     	<a href="index.html" data-icon="delete">Cancel</a>
     	<h1>Edit Contact</h1>
     	<a href="index.html" data-icon="check" data-theme="b">Save</a>
     </div>
     
    - - + +
    Cancel

    Edit Contact

    Save
    - +

    Controlling button position with classes

    - -

    The button position can also be controlled by adding classes to the button anchors, rather than relying on source order. This is especially useful if you only want a button in the right slot. To specify the button position, add the class of ui-btn-left or ui-btn-right to the anchor.

    - +

    The button position can also be controlled by adding classes to the button anchors, rather than relying on source order. This is especially useful if you only want a button in the right slot. To specify the button position, add the class of ui-btn-left or ui-btn-right to the anchor.

    -
    + + +
    
    -<div data-role="header" data-position="inline" 
    +<div data-role="header" data-position="inline"
     	<h1>Page Title</h1>
     	<a href="index.html" data-icon="gear" class="ui-btn-right">Options</a>
     </div>
    -
    -
    +
    +

    Page Title

    Options
    - - + +

    Adding Back buttons

    - -

    jQuery Mobile has a feature to automatically create and append "back" buttons to any header, though it is disabled by default. This is primarily useful in chromeless installed applications, such as those running in a native app web view. The framework automatically generates a "back" button on a header when the page plugin's addBackBtn option is true. This can also be set via markup if the page div has a data-add-back-btn="true" attribute.

    - - -

    If you use the attribute data-rel="back" on an anchor, any clicks on that anchor will mimic the back button, going back one history entry and ignoring the anchor's default href. This is particularly useful when linking back to a named page, such as a link that says "home", or when generating "back" buttons with JavaScript, such as a button to close a dialog. When using this feature in your source markup, be sure to provide a meaningful href that actually points to the URL of the referring page (this will allow the feature to work for users in C-Grade browsers. Also, please keep in mind that if you just want a reverse transition without actually going back in history, you should use the data-direction="reverse" attribute instead.

    - -

    Customizing the back button text

    - + +

    jQuery Mobile has a feature to automatically create and append "back" buttons to any header, though it is disabled by default. This is primarily useful in chromeless installed applications, such as those running in a native app web view. The framework automatically generates a "back" button on a header when the page plugin's addBackBtn option is true. This can also be set via markup if the page div has a data-add-back-btn="true" attribute.

    + + +

    If you use the attribute data-rel="back" on an anchor, any clicks on that anchor will mimic the back button, going back one history entry and ignoring the anchor's default href. This is particularly useful when linking back to a named page, such as a link that says "home", or when generating "back" buttons with JavaScript, such as a button to close a dialog. When using this feature in your source markup, be sure to provide a meaningful href that actually points to the URL of the referring page (this will allow the feature to work for users in C-Grade browsers. Also, please keep in mind that if you just want a reverse transition without actually going back in history, you should use the data-direction="reverse" attribute instead.

    + +

    Customizing the back button text

    +

    If you'd like to configure the back button text, you can either use the data-back-btn-text="previous" attribute on your page element, or set it programmatically via the page plugin's options: $.mobile.page.prototype.options.backBtnText = "previous";. - +

    Default back button style

    If you'd like to configure the back button role-theme, you can use: $.mobile.page.prototype.options.backBtnTheme = "a";. If you're doing this programmatically, set this option inside the mobileinit event handler.

    Custom header configurations

    -

    If you need to to create a header that doesn't follow the default configuration, simply wrap your custom styled markup in a container div inside the header container and the plugin won't apply the automatic button logic so you can write custom styles for laying out the content in your header.

    +

    If you need to to create a header that doesn't follow the default configuration, simply wrap your custom styled markup in a container div inside the header container and the plugin won't apply the automatic button logic so you can write custom styles for laying out the content in your header.

    -
    +
    @@ -156,7 +156,7 @@

    More in this section

    - + diff --git a/docs/toolbars/docs-navbar.html b/docs/toolbars/docs-navbar.html index 905206a0b53..a806bdc5533 100755 --- a/docs/toolbars/docs-navbar.html +++ b/docs/toolbars/docs-navbar.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Navbar - + + jQuery Mobile Docs - Navbar + - - + +
    @@ -21,13 +21,13 @@

    Navbar

    -
    +

    Simple navbar

    - +

    jQuery Mobile has a very basic navbar widget that is useful for providing up to 5 buttons with optional icons in a bar , typically within a header or footer.

    - +

    A navbar is coded as an unordered list of links wrapped in a container element that has the data-role="navbar" attribute. To set one of links to the active (selected) state, add class="ui-btn-active" to the anchor. In this example, we have a two-button navbar in the footer with the "One" item set to active:

    - +
    
     <div data-role="footer">
     	<div data-role="navbar">
    @@ -49,7 +49,7 @@ 

    Simple navbar

    - +

    Adding a third item will automatically make each button 1/3 the width of the browser window:

    @@ -61,7 +61,7 @@

    Simple navbar

    - +

    Adding a fourth more item will automatically make each button 1/4 the width of the browser window:

    @@ -88,9 +88,9 @@

    Simple navbar

    - +

    If more than 5 items are added, the navbar will simply wrap to multiple lines:

    - +
      @@ -107,9 +107,9 @@

      Simple navbar

    - +

    As a fallback, navbars with 1 item will simply render as 100%.

    - +
      @@ -117,15 +117,15 @@

      Simple navbar

    - +

    Navbars in headers

    - +

    If you want to add a navbar to the top of the page, you can still have a page title and buttons. Just add the navbar container inside the header block, right after the title and buttons in the source order.

    I'm a header

    Options - +
    • One
    • @@ -134,9 +134,9 @@

      I'm a header

    - +

    Icons in navbars

    - +

    Icons can be added to navbar items by adding the data-icon attribute specifying a standard mobile icon to each anchor.

    @@ -148,7 +148,7 @@

    Icons in navbars

    - +

    Icons can be stacked above the labels by adding the data-iconpos="top" attribute to each anchor.

    @@ -160,13 +160,13 @@

    Icons in navbars

    - +

    Using 3rd party icon sets

    - +

    You can add any of the popular icon libraries like Glyphish to achieve the iOS style tab tab that has large icons stacked on top of text labels. All that is required is a bit of custom styles to link to the icons and position them in the navbar. Here is an example using Glyphish icons and custom styles (view page source for styles) in our navbar:

    - - - - + - +

    Icons by Joseph Wain / glyphish.com. Licensed under the Creative Commons Attribution 3.0 United States License.

    Theming navbars

    - +

    Navbars can be set to any theme color by data-theme attribute to the links and specifying any theme swatch.

    @@ -205,9 +205,9 @@

    Theming navbars

    - - + +
    @@ -229,7 +229,7 @@

    More in this section

    - + diff --git a/docs/toolbars/footer-persist-a.html b/docs/toolbars/footer-persist-a.html index b04a186a584..c8cd3c70889 100755 --- a/docs/toolbars/footer-persist-a.html +++ b/docs/toolbars/footer-persist-a.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Framework - Persistent footer A - + + jQuery Mobile Framework - Persistent footer A + - - + +
    @@ -19,12 +19,12 @@

    Friends

    Home
    - +

    This page is a demo of a persistent footer navigation bar. At the foot of the page, you'll see a persistent horizontal navigation bar. Click on any of the links, and you'll see the page content transition but the footer remain fixed: The footer sticks persistently even when transitioning to a new HTML page, because the footer on all four HTML pages has the same data-id attribute. Note: If you'd like an active button in your navbar to remain active when you return to it again, add a class of ui-state-persist in addition to ui-btn-active

    - + - @@ -72,7 +71,8 @@

    Friends

    -
    + +
    @@ -94,7 +94,7 @@

    More in this section

    - + diff --git a/docs/toolbars/footer-persist-b.html b/docs/toolbars/footer-persist-b.html index 1761ead1864..07c12425d26 100755 --- a/docs/toolbars/footer-persist-b.html +++ b/docs/toolbars/footer-persist-b.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Framework - Persistent footer B - + + jQuery Mobile Framework - Persistent footer B + - - + +
    @@ -19,7 +19,7 @@

    Albums

    Home
    - +
    @@ -118,7 +118,7 @@

    More in this section

    - + diff --git a/docs/toolbars/footer-persist-c.html b/docs/toolbars/footer-persist-c.html index 59c71ece261..6979a5956a9 100755 --- a/docs/toolbars/footer-persist-c.html +++ b/docs/toolbars/footer-persist-c.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Framework - Persistent footer C - + + jQuery Mobile Framework - Persistent footer C + - - + +
    @@ -19,26 +19,26 @@

    Inbox

    Home
    - +
    @@ -103,7 +103,7 @@

    More in this section

    - + diff --git a/docs/toolbars/index.html b/docs/toolbars/index.html index ea4fa676679..d9024589dea 100755 --- a/docs/toolbars/index.html +++ b/docs/toolbars/index.html @@ -1,17 +1,17 @@ - - + + - - jQuery Mobile Docs - Toolbars - + + jQuery Mobile Docs - Toolbars + - - + +
    @@ -24,7 +24,7 @@

    Toolbars

    Toolbars are used for headers, footers and utility bars throughout a mobile sites and applications, so jQuery Mobile provides a standard set of bars and navigation tools to cover most standard scenarios.

    - + +
    diff --git a/experiments/converter/application.js b/experiments/converter/application.js index 4dd414332d8..bff66f8866f 100644 --- a/experiments/converter/application.js +++ b/experiments/converter/application.js @@ -8,7 +8,7 @@ $(function() { "inch": "\"", "centimeter": "cm" }; - + function list() { var ul = $( "#conversions" ).empty(), ulEdit = $( "#edit-conversions" ).empty(); @@ -68,7 +68,7 @@ $(function() { list(); return false; }); - + $( "#edit-conversions" ).click(function( event ) { var target = $( event.target ).closest( ".deletebutton" ); if ( target.length ) { diff --git a/experiments/converter/index.html b/experiments/converter/index.html index 53237e548c2..17a7b47302d 100644 --- a/experiments/converter/index.html +++ b/experiments/converter/index.html @@ -1,19 +1,19 @@ - - + + - jQuery Mobile Framework - Converter Demo Application + jQuery Mobile Framework - Converter Demo Application - + - - - + + +
    - + @@ -32,7 +32,7 @@ Delete - +
    Edit

    Currency converter

    @@ -50,12 +50,12 @@

    Currency converter

    - +

    Edit conversions

    Done
    - +
    @@ -71,7 +71,7 @@

    Edit conversions

    Add new

    Cancel
    - +

    Select currencies to convert:

    diff --git a/experiments/converter/jquery.tmpl.js b/experiments/converter/jquery.tmpl.js index 8aeef239241..a6e52c0bab0 100644 --- a/experiments/converter/jquery.tmpl.js +++ b/experiments/converter/jquery.tmpl.js @@ -145,7 +145,7 @@ if ( options && options.wrapped ) { updateWrapped( options, options.wrapped ); } - ret = jQuery.isArray( data ) ? + ret = jQuery.isArray( data ) ? jQuery.map( data, function( dataItem ) { return dataItem ? newTmplItem( options, parentItem, tmpl, dataItem ) : null; }) : @@ -191,10 +191,10 @@ return typeof name === "string" ? (jQuery.template[name] = tmpl) : tmpl; } // Return named compiled template - return name ? (typeof name !== "string" ? jQuery.template( null, name ): - (jQuery.template[name] || - // If not in map, treat as a selector. (If integrated with core, use quickExpr.exec) - jQuery.template( null, htmlExpr.test( name ) ? name : jQuery( name )))) : null; + return name ? (typeof name !== "string" ? jQuery.template( null, name ): + (jQuery.template[name] || + // If not in map, treat as a selector. (If integrated with core, use quickExpr.exec) + jQuery.template( null, htmlExpr.test( name ) ? name : jQuery( name )))) : null; }, encode: function( text ) { @@ -209,7 +209,7 @@ _default: { $2: "null" }, open: "if($notnull_1){_=_.concat($item.nest($1,$2));}" // tmpl target parameter can be of type function, so use $1, not $1a (so not auto detection of functions) - // This means that {{tmpl foo}} treats foo as a template (which IS a function). + // This means that {{tmpl foo}} treats foo as a template (which IS a function). // Explicit parens can be used if foo is a function that returns a template: {{tmpl foo()}}. }, "wrap": { @@ -231,7 +231,7 @@ open: "}else if(($notnull_1) && $1a){" }, "html": { - // Unecoded expression evaluation. + // Unecoded expression evaluation. open: "if($notnull_1){_.push($1a);}" }, "=": { @@ -270,16 +270,16 @@ //========================== Private helper functions, used by code above ========================== function build( tmplItem, nested, content ) { - // Convert hierarchical content into flat string array + // Convert hierarchical content into flat string array // and finally return array of fragments ready for DOM insertion var frag, ret = content ? jQuery.map( content, function( item ) { - return (typeof item === "string") ? + return (typeof item === "string") ? // Insert template item annotations, to be converted to jQuery.data( "tmplItem" ) when elems are inserted into DOM. (tmplItem.key ? item.replace( /(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g, "$1 " + tmplItmAtt + "=\"" + tmplItem.key + "\" $2" ) : item) : // This is a child template item. Build nested template. build( item, tmplItem, item._ctnt ); - }) : - // If content is not defined, insert tmplItem directly. Not a template item. May be a string, or a string array, e.g. from {{html $item.html()}}. + }) : + // If content is not defined, insert tmplItem directly. Not a template item. May be a string, or a string array, e.g. from {{html $item.html()}}. tmplItem; if ( nested ) { return ret; @@ -336,7 +336,7 @@ parens = ""; } if ( target ) { - target = unescape( target ); + target = unescape( target ); args = args ? ("," + unescape( args ) + ")") : (parens ? ")" : ""); // Support for target being things like a.toLowerCase(); // In that case don't call with template item as 'this' pointer. Just evaluate... @@ -346,7 +346,7 @@ exprAutoFnDetect = expr = def.$1 || "null"; } fnargs = unescape( fnargs ); - return "');" + + return "');" + tag[ slash ? "close" : "open" ] .split( "$notnull_1" ).join( target ? "typeof(" + target + ")!=='undefined' && (" + target + ")!=null" : "true" ) .split( "$1a" ).join( exprAutoFnDetect ) @@ -364,8 +364,8 @@ ); } function updateWrapped( options, wrapped ) { - // Build the wrapped content. - options._wrap = build( options, true, + // Build the wrapped content. + options._wrap = build( options, true, // Suport imperative scenario in which options.wrapped can be set to a selector or an HTML string. jQuery.isArray( wrapped ) ? wrapped : [htmlExpr.test( wrapped ) ? wrapped : jQuery( wrapped ).html()] ).join(""); @@ -424,9 +424,9 @@ } if ( tmplItem ) { pntItem = tmplItem; - // Find the template item of the parent element. + // Find the template item of the parent element. // (Using !=, not !==, since pntItem.key is number, and pntNode may be a string) - while ( pntItem && pntItem.key != pntNode ) { + while ( pntItem && pntItem.key != pntNode ) { // Add this element as a top-level node for this rendered template item, as well as for any // ancestor items between this item and the item of its parent element pntItem.nodes.push( el ); @@ -440,7 +440,7 @@ } function cloneTmplItem( key ) { key = key + keySuffix; - tmplItem = newClonedItems[key] = + tmplItem = newClonedItems[key] = (newClonedItems[key] || newTmplItem( tmplItem, newTmplItems[tmplItem.parent.key + keySuffix] || tmplItem.parent, null, true )); } } @@ -464,7 +464,7 @@ // nested template, using {{wrap}} tag var options = call.options || {}; options.wrapped = wrapped; - // Apply the template, which may incorporate wrapped content, + // Apply the template, which may incorporate wrapped content, return jQuery.tmpl( jQuery.template( call.tmpl ), call.data, options, call.item ); } diff --git a/experiments/google-maps/index.html b/experiments/google-maps/index.html index 088bc8c33ca..1cd20a8ecb8 100644 --- a/experiments/google-maps/index.html +++ b/experiments/google-maps/index.html @@ -7,19 +7,19 @@ - + - +

    Google maps view

    -
    +

    If you're linking to a map page with jQuery Mobile's Ajax behavior, be sure to load google maps in the first real page's head, since it uses document.write and can not be included in the data-role=page div like normal scripts can. View map

    - + diff --git a/experiments/google-maps/map.html b/experiments/google-maps/map.html index d4b832881f9..47f82dc879c 100644 --- a/experiments/google-maps/map.html +++ b/experiments/google-maps/map.html @@ -6,25 +6,25 @@ Main Page - - + + - - + +
    - +

    Map View

    -
    +
    - + diff --git a/experiments/google-maps/map.js b/experiments/google-maps/map.js index 54d6a245ea2..b4b53dea4e0 100644 --- a/experiments/google-maps/map.js +++ b/experiments/google-maps/map.js @@ -7,13 +7,13 @@ $('.page-map').live("pagecreate", function() { //boston :) var lat = 42.35843, lng = -71.059773; - + //try to get GPS coords if( navigator.geolocation ) { - - //redirect function for successful location + + //redirect function for successful location function gpsSuccess(pos){ - if( pos.coords ){ + if( pos.coords ){ lat = pos.coords.latitude; lng = pos.coords.longitude; } @@ -21,12 +21,12 @@ $('.page-map').live("pagecreate", function() { lat = pos.latitude; lng = pos.longitude; } - } - + } + function gpsFail(){ //Geo-location is supported, but we failed to get your coordinates. Workaround here perhaps? } - + navigator.geolocation.getCurrentPosition(gpsSuccess, gpsFail, {enableHighAccuracy:true, maximumAge: 300000}); } @@ -35,7 +35,7 @@ $('.page-map').live("pagecreate", function() { $.getScript('http://www.google.com/jsapi?key=YOURAPIKEY',function(){ lat = google.loader.ClientLocation.latitude; lng = google.loader.ClientLocation.longitude; - }); + }); */ var latlng = new google.maps.LatLng(lat, lng); diff --git a/experiments/scrollview/index.html b/experiments/scrollview/index.html index 774266195f7..28ef54f368f 100644 --- a/experiments/scrollview/index.html +++ b/experiments/scrollview/index.html @@ -26,41 +26,41 @@ - - + +

    jQuery Mobile Framework

    A few examples tweaked to make use of the scrollview component.

    Alpha Release

    - +
    diff --git a/experiments/scrollview/jquery.easing.1.3.js b/experiments/scrollview/jquery.easing.1.3.js index ef743210795..2e679986e77 100644 --- a/experiments/scrollview/jquery.easing.1.3.js +++ b/experiments/scrollview/jquery.easing.1.3.js @@ -5,33 +5,33 @@ * to offer multiple easing options * * TERMS OF USE - jQuery Easing - * - * Open source under the BSD License. - * + * + * Open source under the BSD License. + * * Copyright © 2008 George McGinley Smith * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, + * + * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this list of + * + * Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials + * Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. - * - * Neither the name of the author nor the names of contributors may be used to endorse + * + * Neither the name of the author nor the names of contributors may be used to endorse * or promote products derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. * */ @@ -147,7 +147,7 @@ jQuery.extend( jQuery.easing, return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; }, easeInOutBack: function (x, t, b, c, d, s) { - if (s == undefined) s = 1.70158; + if (s == undefined) s = 1.70158; if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; }, @@ -174,32 +174,32 @@ jQuery.extend( jQuery.easing, /* * * TERMS OF USE - EASING EQUATIONS - * - * Open source under the BSD License. - * + * + * Open source under the BSD License. + * * Copyright © 2001 Robert Penner * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, + * + * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this list of + * + * Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials + * Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. - * - * Neither the name of the author nor the names of contributors may be used to endorse + * + * Neither the name of the author nor the names of contributors may be used to endorse * or promote products derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. * */ \ No newline at end of file diff --git a/experiments/scrollview/jquery.mobile.scrollview.js b/experiments/scrollview/jquery.mobile.scrollview.js index b190c701c06..9c46217cf0f 100644 --- a/experiments/scrollview/jquery.mobile.scrollview.js +++ b/experiments/scrollview/jquery.mobile.scrollview.js @@ -2,7 +2,7 @@ * jQuery Mobile Framework : scrollview plugin * Copyright (c) 2010 Adobe Systems Incorporated - Kin Blas (jblas@adobe.com) * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. -* Note: Code is in draft form and is subject to change +* Note: Code is in draft form and is subject to change */ (function($,window,document,undefined){ @@ -10,24 +10,24 @@ jQuery.widget( "mobile.scrollview", jQuery.mobile.widget, { options: { fps: 60, // Frames per second in msecs. direction: null, // "x", "y", or null for both. - + scrollDuration: 2000, // Duration of the scrolling animation in msecs. overshootDuration: 250, // Duration of the overshoot animation in msecs. snapbackDuration: 500, // Duration of the snapback animation in msecs. - + moveThreshold: 10, // User must move this many pixels in any direction to trigger a scroll. moveIntervalThreshold: 150, // Time between mousemoves must not exceed this threshold. - + scrollMethod: "translate", // "translate", "position", "scroll" - + startEventName: "scrollstart", updateEventName: "scrollupdate", stopEventName: "scrollstop", - + eventType: $.support.touch ? "touch" : "mouse", - + showScrollBars: true, - + pagingEnabled: false, delayedClickSelector: "a,input,textarea,select,button,.ui-btn", delayedClickEnabled: false @@ -40,7 +40,7 @@ jQuery.widget( "mobile.scrollview", jQuery.mobile.widget, { }, _create: function() - { + { this._$clip = $(this.element).addClass("ui-scrollview-clip"); var $child = this._$clip.children(); if ($child.length > 1) { @@ -67,17 +67,17 @@ jQuery.widget( "mobile.scrollview", jQuery.mobile.widget, { this._sx = 0; this._sy = 0; - + var direction = this.options.direction; this._hTracker = (direction !== "y") ? new MomentumTracker(this.options) : null; this._vTracker = (direction !== "x") ? new MomentumTracker(this.options) : null; - + this._timerInterval = 1000/this.options.fps; this._timerID = 0; - + var self = this; this._timerCB = function(){ self._handleMomentumScroll(); }; - + this._addBehaviors(); }, @@ -160,7 +160,7 @@ jQuery.widget( "mobile.scrollview", jQuery.mobile.widget, { this._$clip.trigger(this.options.updateEventName, [ { x: x, y: y } ]); if (keepGoing) - this._timerID = setTimeout(this._timerCB, this._timerInterval); + this._timerID = setTimeout(this._timerCB, this._timerInterval); else this._stopMScroll(); }, @@ -320,7 +320,7 @@ jQuery.widget( "mobile.scrollview", jQuery.mobile.widget, { this._pageDelta = 0; this._pageSize = 0; - this._pagePos = 0; + this._pagePos = 0; if (this.options.pagingEnabled && (svdir === "x" || svdir === "y")) { @@ -481,7 +481,7 @@ jQuery.widget( "mobile.scrollview", jQuery.mobile.widget, { // scrolling the main window. // e.preventDefault(); - + return false; }, @@ -675,15 +675,15 @@ $.extend(MomentumTracker.prototype, { if (state == tstates.scrolling || state == tstates.overshot) { var dx = this.speed * (1 - $.easing[this.easing](elapsed/duration, elapsed, 0, 1, duration)); - + var x = this.pos + dx; - + var didOverShoot = (state == tstates.scrolling) && (x < this.minPos || x > this.maxPos); if (didOverShoot) x = (x < this.minPos) ? this.minPos : this.maxPos; - + this.pos = x; - + if (state == tstates.overshot) { if (elapsed >= duration) @@ -714,7 +714,7 @@ $.extend(MomentumTracker.prototype, { if (elapsed >= duration) { this.pos = this.toPos; - this.state = tstates.done; + this.state = tstates.done; } else this.pos = this.fromPos + ((this.toPos - this.fromPos) * $.easing[this.easing](elapsed/duration, elapsed, 0, 1, duration)); @@ -734,13 +734,13 @@ jQuery.widget( "mobile.scrolllistview", jQuery.mobile.scrollview, { _create: function() { $.mobile.scrollview.prototype._create.call(this); - + // Cache the dividers so we don't have to search for them everytime the // view is scrolled. // // XXX: Note that we need to update this cache if we ever support lists // that can dynamically update their content. - + this._$dividers = this._$view.find(":jqmData(role='list-divider')"); this._lastDivider = null; }, @@ -748,7 +748,7 @@ jQuery.widget( "mobile.scrolllistview", jQuery.mobile.scrollview, { _setScrollPosition: function(x, y) { // Let the view scroll like it normally does. - + $.mobile.scrollview.prototype._setScrollPosition.call(this, x, y); y = -y; diff --git a/experiments/scrollview/lists-divider.html b/experiments/scrollview/lists-divider.html index 856965752aa..8277cd151ea 100644 --- a/experiments/scrollview/lists-divider.html +++ b/experiments/scrollview/lists-divider.html @@ -1,10 +1,10 @@ - - + + - - jQuery Mobile Docs - Lists - + + jQuery Mobile Docs - Lists + @@ -43,7 +43,7 @@

    Form Element Event Test

    - +

    The form elements on this page are wrapped by a special div that has event handlers for touchstart, touchmove and touchstop. The checkboxes below control how the event within these handlers is treated when they fire. Use this page to figure out how the various event treatments impact the form elements on you mobile device, then add to the notes at the bottom of the page.

    All scrolling on this page is performed by the native viewport, there are no scrollviews on this page.

    @@ -245,7 +245,7 @@

    Notes

    - +
    diff --git a/experiments/scrollview/sv-test-02.html b/experiments/scrollview/sv-test-02.html index 358061ce67f..287b82cdefd 100644 --- a/experiments/scrollview/sv-test-02.html +++ b/experiments/scrollview/sv-test-02.html @@ -11,7 +11,7 @@ #evtCatcher { border: solid 1px black; background-color: #FF9; - padding: 10px; + padding: 10px; height: 300px; } #evtCatcher .ui-scrollview-view { @@ -128,7 +128,7 @@

    Scroll View Events Test

    - +

    Test

    This page wraps the _handleDragStart, _handleDragMove, and _handleDragStop events of the scrollview widget so that the checkboxes below can determine how the native event is treated. You can use this page to figure out what events need to be caught and what special treatment is necessary to prevent native scrolling. You can also test the effect of that treatment on form elements within the sample scrollview.

    @@ -233,7 +233,7 @@

    Notes

     

    - +
    diff --git a/experiments/themeswitcher/jquery.mobile.themeswitcher.js b/experiments/themeswitcher/jquery.mobile.themeswitcher.js index c770e4d1503..623dd49e056 100644 --- a/experiments/themeswitcher/jquery.mobile.themeswitcher.js +++ b/experiments/themeswitcher/jquery.mobile.themeswitcher.js @@ -12,9 +12,9 @@ '
      '+ '
      ' ) .appendTo( $.mobile.pageContainer ), - menu = menuPage.find('ul'); - - //menu items + menu = menuPage.find('ul'); + + //menu items $.each(themes, function( i ){ $('
    • ' + themes[ i ].charAt(0).toUpperCase() + themes[ i ].substr(1) + '
    • ') .bind("vclick", function(){ @@ -23,8 +23,8 @@ return false; }) .appendTo(menu); - }); - + }); + //remover, adder function addTheme(theme){ $('head').append( '' ); @@ -33,5 +33,5 @@ //create page, listview menuPage.page(); - }; + }; })(jQuery); diff --git a/experiments/weather/index.php b/experiments/weather/index.php index edf5b9544cb..6dfff691cc8 100644 --- a/experiments/weather/index.php +++ b/experiments/weather/index.php @@ -6,8 +6,8 @@ curl_setopt($ch, CURLOPT_URL, 'http://www.google.com/ig/api?weather='. $location); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); -curl_setopt($ch, CURLOPT_TIMEOUT, 10); -$result = curl_exec($ch); +curl_setopt($ch, CURLOPT_TIMEOUT, 10); +$result = curl_exec($ch); curl_close($ch); //parse xml (thx KomunitasWeb.com for pointers) @@ -16,12 +16,12 @@ $current = $xml->xpath("/xml_api_reply/weather/current_conditions"); $forecast_list = $xml->xpath("/xml_api_reply/weather/forecast_conditions"); ?> - - + + - - jQuery Mobile Framework - Weather for <?php echo $information[0]->city['data']; ?> + + jQuery Mobile Framework - Weather for <?php echo $information[0]->city['data']; ?> @@ -40,8 +40,8 @@ $('.ui-listview img').removeClass('ui-corner-bl'); }); - - + +
      @@ -60,7 +60,7 @@

      temp_f['data']; ?>° F, condition['data']; ?> - +

      @@ -68,21 +68,21 @@
      • This week's forecast
      • - +
      • - +

        day_of_week['data']; ?>

        low['data']; ?>° F - high['data']; ?>° F, condition['data']; ?>

      • - + -
      +
      - - + + diff --git a/external/qunit.js b/external/qunit.js index caf473316c0..49c71046a41 100644 --- a/external/qunit.js +++ b/external/qunit.js @@ -1,6 +1,6 @@ /* * QUnit - A JavaScript Unit Testing Framework - * + * * http://docs.jquery.com/QUnit * * Copyright (c) 2009 John Resig, Jörn Zaefferer @@ -68,7 +68,7 @@ Test.prototype = { // allow utility functions to access the current test environment // TODO why?? QUnit.current_testEnvironment = this.testEnvironment; - + try { if ( !config.pollution ) { saveGlobal(); @@ -113,7 +113,7 @@ Test.prototype = { if ( this.expected && this.expected != this.assertions.length ) { QUnit.ok( false, "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" ); } - + var good = 0, bad = 0, tests = id("qunit-tests"); @@ -149,12 +149,12 @@ Test.prototype = { var b = document.createElement("strong"); b.innerHTML = this.name + " (" + bad + ", " + good + ", " + this.assertions.length + ")"; - + addEvent(b, "click", function() { var next = b.nextSibling, display = next.style.display; next.style.display = display === "none" ? "block" : "none"; }); - + addEvent(b, "dblclick", function(e) { var target = e && e.target ? e.target : window.event.srcElement; if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) { @@ -199,7 +199,7 @@ Test.prototype = { QUnit.testDone( this.testName, bad, this.assertions.length ); }, - + queue: function() { var test = this; synchronize(function() { @@ -228,7 +228,7 @@ Test.prototype = { synchronize(run); }; } - + } var QUnit = { @@ -248,7 +248,7 @@ var QUnit = { QUnit.test(testName, expected, callback, true); }, - + test: function(testName, expected, callback, async) { var name = '' + testName + '', testEnvironmentArg; @@ -269,14 +269,14 @@ var QUnit = { if ( !validTest(config.currentModule + ": " + testName) ) { return; } - + var test = new Test(name, testName, expected, testEnvironmentArg, async, callback); test.previousModule = config.previousModule; test.module = config.currentModule; test.moduleTestEnvironment = config.currentModuleTestEnviroment; test.queue(); }, - + /** * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. */ @@ -321,7 +321,7 @@ var QUnit = { notEqual: function(actual, expected, message) { QUnit.push(expected != actual, actual, expected, message); }, - + deepEqual: function(actual, expected, message) { QUnit.push(QUnit.equiv(actual, expected), actual, expected, message); }, @@ -364,7 +364,7 @@ var QUnit = { process(); } }, - + stop: function(timeout) { config.blocking = true; @@ -407,10 +407,10 @@ var config = { i--; } } - + // restrict modules/tests by get parameters config.filters = GETParams; - + // Figure out if we're running the tests from a server or not QUnit.isLocal = !!(location.protocol === 'file:'); })(); @@ -459,10 +459,10 @@ extend(QUnit, { result.parentNode.removeChild( result ); } }, - + /** * Resets the test setup. Useful for tests that modify the DOM. - * + * * If jQuery is available, uses jQuery's html(), otherwise just innerHTML. */ reset: function() { @@ -475,7 +475,7 @@ extend(QUnit, { } } }, - + /** * Trigger an event on an element. * @@ -495,12 +495,12 @@ extend(QUnit, { elem.fireEvent("on"+type); } }, - + // Safe object type checking is: function( type, obj ) { return QUnit.objectType( obj ) == type; }, - + objectType: function( obj ) { if (typeof obj === "undefined") { return "undefined"; @@ -534,7 +534,7 @@ extend(QUnit, { } return undefined; }, - + push: function(result, actual, expected, message) { var details = { result: result, @@ -542,7 +542,7 @@ extend(QUnit, { actual: actual, expected: expected }; - + message = escapeHtml(message) || (result ? "okay" : "failed"); message = '' + message + ""; expected = escapeHtml(QUnit.jsDump.parse(expected)); @@ -560,15 +560,15 @@ extend(QUnit, { } } output += ""; - + QUnit.log(result, message, details); - + config.current.assertions.push({ result: !!result, message: output }); }, - + // Logging callbacks begin: function() {}, done: function(failures, total) {}, @@ -585,7 +585,7 @@ if ( typeof document === "undefined" || document.readyState === "complete" ) { addEvent(window, "load", function() { QUnit.begin(); - + // Initialize the config, saving the execution queue var oldconfig = extend({}, config); QUnit.init(); @@ -610,11 +610,11 @@ addEvent(window, "load", function() { } } } - + var toolbar = id("qunit-testrunner-toolbar"); if ( toolbar ) { toolbar.style.display = "none"; - + var filter = document.createElement("input"); filter.type = "checkbox"; filter.id = "qunit-filter-pass"; @@ -663,7 +663,7 @@ function done() { banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass"); } - if ( tests ) { + if ( tests ) { var result = id("qunit-testresult"); if ( !result ) { @@ -686,7 +686,7 @@ function validTest( name ) { if ( !i ) { return true; } - + while ( i-- ) { var filter = config.filters[i], not = filter.charAt(0) == '!'; @@ -770,7 +770,7 @@ function process() { function saveGlobal() { config.pollution = []; - + if ( config.noglobals ) { for ( var key in window ) { config.pollution.push( key ); @@ -781,7 +781,7 @@ function saveGlobal() { function checkPollution( name ) { var old = config.pollution; saveGlobal(); - + var newGlobals = diff( old, config.pollution ); if ( newGlobals.length > 0 ) { ok( false, "Introduced global variable(s): " + newGlobals.join(", ") ); @@ -865,7 +865,7 @@ QUnit.equiv = function () { } } } - + var callbacks = function () { // for string, boolean, number and null @@ -919,13 +919,13 @@ QUnit.equiv = function () { // b could be an object literal here if ( ! (QUnit.objectType(b) === "array")) { return false; - } - + } + len = a.length; if (len !== b.length) { // safe and faster return false; } - + //track reference to avoid circular references parents.push(a); for (i = 0; i < len; i++) { @@ -958,7 +958,7 @@ QUnit.equiv = function () { callers.push(a.constructor); //track reference to avoid circular references parents.push(a); - + for (i in a) { // be strict: don't ensures hasOwnProperty and go deep loop = false; for(j=0;j'; - + var tag = node.nodeName.toLowerCase(), ret = open + tag; - + for ( var a in QUnit.jsDump.DOMAttrs ) { var val = node[QUnit.jsDump.DOMAttrs[a]]; if ( val ) @@ -1152,8 +1152,8 @@ QUnit.jsDump = (function() { }, functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function var l = fn.length; - if ( !l ) return ''; - + if ( !l ) return ''; + var args = Array(l); while ( l-- ) args[l] = String.fromCharCode(97+l);//97 is 'a' @@ -1210,34 +1210,34 @@ function getText( elems ) { * * More Info: * http://ejohn.org/projects/javascript-diff-algorithm/ - * + * * Usage: QUnit.diff(expected, actual) - * + * * QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick brown fox jumped jumps over" */ QUnit.diff = (function() { function diff(o, n){ var ns = new Object(); var os = new Object(); - + for (var i = 0; i < n.length; i++) { - if (ns[n[i]] == null) + if (ns[n[i]] == null) ns[n[i]] = { rows: new Array(), o: null }; ns[n[i]].rows.push(i); } - + for (var i = 0; i < o.length; i++) { - if (os[o[i]] == null) + if (os[o[i]] == null) os[o[i]] = { rows: new Array(), n: null }; os[o[i]].rows.push(i); } - + for (var i in ns) { if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) { n[ns[i].rows[0]] = { @@ -1250,7 +1250,7 @@ QUnit.diff = (function() { }; } } - + for (var i = 0; i < n.length - 1; i++) { if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null && n[i + 1] == o[n[i].row + 1]) { @@ -1264,7 +1264,7 @@ QUnit.diff = (function() { }; } } - + for (var i = n.length - 1; i > 0; i--) { if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null && n[i - 1] == o[n[i].row - 1]) { @@ -1278,20 +1278,20 @@ QUnit.diff = (function() { }; } } - + return { o: o, n: n }; } - + return function(o, n){ o = o.replace(/\s+$/, ''); n = n.replace(/\s+$/, ''); var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/)); var str = ""; - + var oSpace = o.match(/\s+/g); if (oSpace == null) { oSpace = [" "]; @@ -1306,7 +1306,7 @@ QUnit.diff = (function() { else { nSpace.push(" "); } - + if (out.n.length == 0) { for (var i = 0; i < out.o.length; i++) { str += '' + out.o[i] + oSpace[i] + ""; @@ -1318,14 +1318,14 @@ QUnit.diff = (function() { str += '' + out.o[n] + oSpace[n] + ""; } } - + for (var i = 0; i < out.n.length; i++) { if (out.n[i].text == null) { str += '' + out.n[i] + nSpace[i] + ""; } else { var pre = ""; - + for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) { pre += '' + out.o[n] + oSpace[n] + ""; } @@ -1333,7 +1333,7 @@ QUnit.diff = (function() { } } } - + return str; }; })(); diff --git a/index.html b/index.html index ff9e3ba1465..8e7b3648363 100755 --- a/index.html +++ b/index.html @@ -10,24 +10,24 @@ - - - + + +
      - - + +
      - +

      jQuery Mobile Framework

      A Touch-Optimized Web Framework for Smartphones & Tablets

      Beta Release

      - - + +

      Welcome. Browse the jQuery Mobile components and learn how to make rich, accessible, touch-friendly websites and apps.

      - + - -
      - + +
      +
      - +
      - + - + + diff --git a/js/jquery.js b/js/jquery.js index 829c70604b8..f0e0cedff10 100644 --- a/js/jquery.js +++ b/js/jquery.js @@ -1511,7 +1511,7 @@ jQuery.extend({ return thisCache[ internalKey ] && thisCache[ internalKey ].events; } - return getByName ? + return getByName ? // Check for both converted-to-camel and non-converted data property names thisCache[ jQuery.camelCase( name ) ] || thisCache[ name ] : thisCache; @@ -1923,11 +1923,11 @@ jQuery.fn.extend({ jQuery.removeAttr( this, name ); }); }, - + prop: function( name, value ) { return jQuery.access( this, name, value, true, jQuery.prop ); }, - + removeProp: function( name ) { name = jQuery.propFix[ name ] || name; return this.each(function() { @@ -2060,7 +2060,7 @@ jQuery.fn.extend({ val: function( value ) { var hooks, ret, elem = this[0]; - + if ( !arguments.length ) { if ( elem ) { hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; @@ -2071,9 +2071,9 @@ jQuery.fn.extend({ ret = elem.value; - return typeof ret === "string" ? + return typeof ret === "string" ? // handle most common string cases - ret.replace(rreturn, "") : + ret.replace(rreturn, "") : // handle cases where value is null/undef or number ret == null ? "" : ret; } @@ -2194,15 +2194,15 @@ jQuery.extend({ height: true, offset: true }, - + attrFix: { // Always normalize to ensure hook usage tabindex: "tabIndex" }, - + attr: function( elem, name, value, pass ) { var nType = elem.nodeType; - + // don't get/set attributes on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return undefined; @@ -2273,7 +2273,7 @@ jQuery.extend({ var propName; if ( elem.nodeType === 1 ) { name = jQuery.attrFix[ name ] || name; - + if ( jQuery.support.getSetAttribute ) { // Use removeAttribute in browsers that support it elem.removeAttribute( name ); @@ -2356,7 +2356,7 @@ jQuery.extend({ frameborder: "frameBorder", contenteditable: "contentEditable" }, - + prop: function( elem, name, value ) { var nType = elem.nodeType; @@ -2391,7 +2391,7 @@ jQuery.extend({ } } }, - + propHooks: {} }); @@ -2428,7 +2428,7 @@ if ( !jQuery.support.getSetAttribute ) { // propFix is more comprehensive and contains all fixes jQuery.attrFix = jQuery.propFix; - + // Use this for any attribute on a form in IE6/7 formHook = jQuery.attrHooks.name = jQuery.attrHooks.title = jQuery.valHooks.button = { get: function( elem, name ) { @@ -2798,7 +2798,7 @@ jQuery.event = { } } }, - + // Events that are safe to short-circuit if no handlers are attached. // Native DOM events should not be added, they may have inline handlers. customEvent: { @@ -2844,7 +2844,7 @@ jQuery.event = { event.exclusive = exclusive; event.namespace = namespaces.join("."); event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)"); - + // triggerHandler() and global events don't bubble or run the default action if ( onlyHandlers || !elem ) { event.preventDefault(); @@ -2935,7 +2935,7 @@ jQuery.event = { jQuery.event.triggered = undefined; } } - + return event.result; }, @@ -3763,7 +3763,7 @@ var Sizzle = function( selector, context, results, seed ) { if ( context.nodeType !== 1 && context.nodeType !== 9 ) { return []; } - + if ( !selector || typeof selector !== "string" ) { return results; } @@ -3773,7 +3773,7 @@ var Sizzle = function( selector, context, results, seed ) { contextXML = Sizzle.isXML( context ), parts = [], soFar = selector; - + // Reset the position of the chunker regexp (start from head) do { chunker.exec( "" ); @@ -3781,9 +3781,9 @@ var Sizzle = function( selector, context, results, seed ) { if ( m ) { soFar = m[3]; - + parts.push( m[1] ); - + if ( m[2] ) { extra = m[3]; break; @@ -3807,7 +3807,7 @@ var Sizzle = function( selector, context, results, seed ) { if ( Expr.relative[ selector ] ) { selector += parts.shift(); } - + set = posProcess( selector, set ); } } @@ -3936,7 +3936,7 @@ Sizzle.find = function( expr, context, isXML ) { for ( var i = 0, l = Expr.order.length; i < l; i++ ) { var match, type = Expr.order[i]; - + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { var left = match[1]; match.splice( 1, 1 ); @@ -4268,7 +4268,7 @@ var Expr = Sizzle.selectors = { ATTR: function( match, curLoop, inplace, result, not, isXML ) { var name = match[1] = match[1].replace( rBackslash, "" ); - + if ( !isXML && Expr.attrMap[name] ) { match[1] = Expr.attrMap[name]; } @@ -4302,7 +4302,7 @@ var Expr = Sizzle.selectors = { } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { return true; } - + return match; }, @@ -4312,7 +4312,7 @@ var Expr = Sizzle.selectors = { return match; } }, - + filters: { enabled: function( elem ) { return elem.disabled === false && elem.type !== "hidden"; @@ -4325,14 +4325,14 @@ var Expr = Sizzle.selectors = { checked: function( elem ) { return elem.checked === true; }, - + selected: function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { elem.parentNode.selectedIndex; } - + return elem.selected === true; }, @@ -4354,7 +4354,7 @@ var Expr = Sizzle.selectors = { text: function( elem ) { var attr = elem.getAttribute( "type" ), type = elem.type; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) // use getAttribute instead to test this case return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); }, @@ -4470,21 +4470,21 @@ var Expr = Sizzle.selectors = { case "only": case "first": while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; + if ( node.nodeType === 1 ) { + return false; } } - if ( type === "first" ) { - return true; + if ( type === "first" ) { + return true; } node = elem; case "last": while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; + if ( node.nodeType === 1 ) { + return false; } } @@ -4497,22 +4497,22 @@ var Expr = Sizzle.selectors = { if ( first === 1 && last === 0 ) { return true; } - + var doneName = match[0], parent = elem.parentNode; - + if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { var count = 0; - + for ( node = parent.firstChild; node; node = node.nextSibling ) { if ( node.nodeType === 1 ) { node.nodeIndex = ++count; } - } + } parent.sizcache = doneName; } - + var diff = elem.nodeIndex - last; if ( first === 0 ) { @@ -4531,7 +4531,7 @@ var Expr = Sizzle.selectors = { TAG: function( elem, match ) { return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; }, - + CLASS: function( elem, match ) { return (" " + (elem.className || elem.getAttribute("class")) + " ") .indexOf( match ) > -1; @@ -4597,7 +4597,7 @@ var makeArray = function( array, results ) { results.push.apply( results, array ); return results; } - + return array; }; @@ -4849,7 +4849,7 @@ if ( document.querySelectorAll ) { if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { return; } - + Sizzle = function( query, context, extra, seed ) { context = context || document; @@ -4858,24 +4858,24 @@ if ( document.querySelectorAll ) { if ( !seed && !Sizzle.isXML(context) ) { // See if we find a selector to speed up var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); - + if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { // Speed-up: Sizzle("TAG") if ( match[1] ) { return makeArray( context.getElementsByTagName( query ), extra ); - + // Speed-up: Sizzle(".CLASS") } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { return makeArray( context.getElementsByClassName( match[2] ), extra ); } } - + if ( context.nodeType === 9 ) { // Speed-up: Sizzle("body") // The body element only exists once, optimize finding it if ( query === "body" && context.body ) { return makeArray( [ context.body ], extra ); - + // Speed-up: Sizzle("#ID") } else if ( match && match[3] ) { var elem = context.getElementById( match[3] ); @@ -4888,12 +4888,12 @@ if ( document.querySelectorAll ) { if ( elem.id === match[3] ) { return makeArray( [ elem ], extra ); } - + } else { return makeArray( [], extra ); } } - + try { return makeArray( context.querySelectorAll(query), extra ); } catch(qsaError) {} @@ -4931,7 +4931,7 @@ if ( document.querySelectorAll ) { } } } - + return oldSizzle(query, context, extra, seed); }; @@ -4958,7 +4958,7 @@ if ( document.querySelectorAll ) { // This should fail with an exception // Gecko does not error, returns false instead matches.call( document.documentElement, "[test!='']:sizzle" ); - + } catch( pseudoError ) { pseudoWorks = true; } @@ -4968,7 +4968,7 @@ if ( document.querySelectorAll ) { expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); if ( !Sizzle.isXML( node ) ) { - try { + try { if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { var ret = matches.call( node, expr ); @@ -5005,7 +5005,7 @@ if ( document.querySelectorAll ) { if ( div.getElementsByClassName("e").length === 1 ) { return; } - + Expr.order.splice(1, 0, "CLASS"); Expr.find.CLASS = function( match, context, isXML ) { if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { @@ -5056,7 +5056,7 @@ function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { if ( elem ) { var match = false; - + elem = elem[dir]; while ( elem ) { @@ -5109,7 +5109,7 @@ if ( document.documentElement.contains ) { Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) + // (such as loading iframes in IE - #4833) var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; @@ -5230,7 +5230,7 @@ jQuery.fn.extend({ closest: function( selectors, context ) { var ret = [], i, l, cur = this[0]; - + // Array if ( jQuery.isArray( selectors ) ) { var match, selector, diff --git a/js/jquery.mobile.degradeInputs.js b/js/jquery.mobile.degradeInputs.js index 8f4a024524d..9b31c8ae57c 100644 --- a/js/jquery.mobile.degradeInputs.js +++ b/js/jquery.mobile.degradeInputs.js @@ -28,10 +28,10 @@ $.mobile.page.prototype.options.keepNative = ":jqmData(role='none'), :jqmData(ro //auto self-init widgets $( document ).bind( "pagecreate enhance", function( e ){ - + var page = $( e.target ).data( "page" ), o = page.options; - + // degrade inputs to avoid poorly implemented native functionality $( e.target ).find( "input" ).not( o.keepNative ).each(function() { var $this = $( this ), @@ -45,7 +45,7 @@ $( document ).bind( "pagecreate enhance", function( e ){ ); } }); - + }); })( jQuery ); \ No newline at end of file diff --git a/js/jquery.mobile.dialog.js b/js/jquery.mobile.dialog.js index 24d974f50d2..62854bbbeb0 100644 --- a/js/jquery.mobile.dialog.js +++ b/js/jquery.mobile.dialog.js @@ -15,13 +15,13 @@ $.widget( "mobile.dialog", $.mobile.widget, { _create: function() { var $el = this.element, pageTheme = $el.attr( "class" ).match( /ui-body-[a-z]/ ); - + if( pageTheme.length ){ $el.removeClass( pageTheme[ 0 ] ); - } - + } + $el.addClass( "ui-body-" + this.options.theme ); - + // Class the markup for dialog styling // Set aria role $el.attr( "role", "dialog" ) diff --git a/js/jquery.mobile.event.js b/js/jquery.mobile.event.js index 03bffaabbe1..6a58cefa5c7 100644 --- a/js/jquery.mobile.event.js +++ b/js/jquery.mobile.event.js @@ -118,11 +118,11 @@ $.event.special.tap = { // also handles swipeleft, swiperight $.event.special.swipe = { scrollSupressionThreshold: 10, // More than this horizontal displacement, and we will suppress scrolling. - + durationThreshold: 1000, // More time than this, and it isn't a swipe. - + horizontalDistanceThreshold: 30, // Swipe horizontal displacement must be more than this. - + verticalDistanceThreshold: 75, // Swipe vertical displacement must be less than this. setup: function() { diff --git a/js/jquery.mobile.fixHeaderFooter.native.js b/js/jquery.mobile.fixHeaderFooter.native.js index 382a7bcf02c..98ba4d7f028 100644 --- a/js/jquery.mobile.fixHeaderFooter.native.js +++ b/js/jquery.mobile.fixHeaderFooter.native.js @@ -11,30 +11,30 @@ $.mobile.touchOverflowEnabled = false; $( document ).bind( "pagecreate", function( event ) { if( $.support.touchOverflow && $.mobile.touchOverflowEnabled ){ - + var $target = $( event.target ), scrollStartY = 0; - + if( $target.is( ":jqmData(role='page')" ) ){ - + $target.each(function() { var $page = $( this ), $fixies = $page.find( ":jqmData(role='header'), :jqmData(role='footer')" ).filter( ":jqmData(position='fixed')" ), fullScreen = $page.jqmData( "fullscreen" ), $scrollElem = $fixies.length ? $page.find( ".ui-content" ) : $page; - + $page.addClass( "ui-mobile-touch-overflow" ); - + $scrollElem.bind( "scrollstop", function(){ if( $scrollElem.scrollTop() > 0 ){ window.scrollTo( 0, $.mobile.defaultHomeScroll ); } - }); - + }); + if( $fixies.length ){ - + $page.addClass( "ui-native-fixed" ); - + if( fullScreen ){ $page.addClass( "ui-native-fullscreen" ); diff --git a/js/jquery.mobile.forms.textinput.js b/js/jquery.mobile.forms.textinput.js index 1d8ab441173..b9652b6919e 100644 --- a/js/jquery.mobile.forms.textinput.js +++ b/js/jquery.mobile.forms.textinput.js @@ -33,7 +33,7 @@ $.widget( "mobile.textinput", $.mobile.widget, { input.addClass("ui-input-text ui-body-"+ o.theme ); focusedEl = input; - + // XXX: Temporary workaround for issue 785. Turn off autocorrect and // autocomplete since the popup they use can't be dismissed by // the user. Note that we test for the presence of the feature @@ -44,7 +44,7 @@ $.widget( "mobile.textinput", $.mobile.widget, { input[0].setAttribute( "autocorrect", "off" ); input[0].setAttribute( "autocomplete", "off" ); } - + //"search" input widget if ( input.is( "[type='search'],:jqmData(type='search')" ) ) { @@ -125,11 +125,11 @@ $.widget( "mobile.textinput", $.mobile.widget, { //auto self-init widgets $( document ).bind( "pagecreate create", function( e ){ - + $( $.mobile.textinput.prototype.options.initSelector, e.target ) .not( ":jqmData(role='none'), :jqmData(role='nojs')" ) .textinput(); - + }); })( jQuery ); diff --git a/js/jquery.mobile.hashchange.js b/js/jquery.mobile.hashchange.js index 47105f4abcf..1f0592bf148 100644 --- a/js/jquery.mobile.hashchange.js +++ b/js/jquery.mobile.hashchange.js @@ -1,7 +1,7 @@ /*! * jQuery hashchange event - v1.3 - 7/21/2010 * http://benalman.com/projects/jquery-hashchange-plugin/ - * + * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ @@ -10,59 +10,59 @@ // Script: jQuery hashchange event // // *Version: 1.3, Last updated: 7/21/2010* -// +// // Project Home - http://benalman.com/projects/jquery-hashchange-plugin/ // GitHub - http://github.com/cowboy/jquery-hashchange/ // Source - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.js // (Minified) - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.min.js (0.8kb gzipped) -// +// // About: License -// +// // Copyright (c) 2010 "Cowboy" Ben Alman, // Dual licensed under the MIT and GPL licenses. // http://benalman.com/about/license/ -// +// // About: Examples -// +// // These working examples, complete with fully commented code, illustrate a few // ways in which this plugin can be used. -// +// // hashchange event - http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/ // document.domain - http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/ -// +// // About: Support and Testing -// +// // Information about what version or versions of jQuery this plugin has been // tested with, what browsers it has been tested in, and where the unit tests // reside (so you can test it yourself). -// +// // jQuery Versions - 1.2.6, 1.3.2, 1.4.1, 1.4.2 // Browsers Tested - Internet Explorer 6-8, Firefox 2-4, Chrome 5-6, Safari 3.2-5, // Opera 9.6-10.60, iPhone 3.1, Android 1.6-2.2, BlackBerry 4.6-5. // Unit Tests - http://benalman.com/code/projects/jquery-hashchange/unit/ -// +// // About: Known issues -// +// // While this jQuery hashchange event implementation is quite stable and // robust, there are a few unfortunate browser bugs surrounding expected // hashchange event-based behaviors, independent of any JavaScript // window.onhashchange abstraction. See the following examples for more // information: -// +// // Chrome: Back Button - http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/ // Firefox: Remote XMLHttpRequest - http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/ // WebKit: Back Button in an Iframe - http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/ // Safari: Back Button from a different domain - http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/ -// -// Also note that should a browser natively support the window.onhashchange +// +// Also note that should a browser natively support the window.onhashchange // event, but not report that it does, the fallback polling loop will be used. -// +// // About: Release History -// +// // 1.3 - (7/21/2010) Reorganized IE6/7 Iframe code to make it more // "removable" for mobile-only development. Added IE6/7 document.title // support. Attempted to make Iframe as hidden as possible by using -// techniques from http://www.paciellogroup.com/blog/?p=604. Added +// techniques from http://www.paciellogroup.com/blog/?p=604. Added // support for the "shortcut" format $(window).hashchange( fn ) and // $(window).hashchange() like jQuery provides for built-in events. // Renamed jQuery.hashchangeDelay to and @@ -87,40 +87,40 @@ (function($,window,undefined){ '$:nomunge'; // Used by YUI compressor. - + // Reused string. var str_hashchange = 'hashchange', - + // Method / object references. doc = document, fake_onhashchange, special = $.event.special, - + // Does the browser support window.onhashchange? Note that IE8 running in // IE7 compatibility mode reports true for 'onhashchange' in window, even // though the event isn't supported, so also test document.documentMode. doc_mode = doc.documentMode, supports_onhashchange = 'on' + str_hashchange in window && ( doc_mode === undefined || doc_mode > 7 ); - + // Get location.hash (or what you'd expect location.hash to be) sans any // leading #. Thanks for making this necessary, Firefox! function get_fragment( url ) { url = url || location.href; return '#' + url.replace( /^[^#]*#?(.*)$/, '$1' ); }; - + // Method: jQuery.fn.hashchange - // + // // Bind a handler to the window.onhashchange event or trigger all bound // window.onhashchange event handlers. This behavior is consistent with // jQuery's built-in event handlers. - // + // // Usage: - // + // // > jQuery(window).hashchange( [ handler ] ); - // + // // Arguments: - // + // // handler - (Function) Optional handler to be bound to the hashchange // event. This is a "shortcut" for the more verbose form: // jQuery(window).bind( 'hashchange', handler ). If handler is omitted, @@ -128,127 +128,127 @@ // is a shortcut for the more verbose // jQuery(window).trigger( 'hashchange' ). These forms are described in // the section. - // + // // Returns: - // + // // (jQuery) The initial jQuery collection of elements. - + // Allow the "shortcut" format $(elem).hashchange( fn ) for binding and // $(elem).hashchange() for triggering, like jQuery does for built-in events. $.fn[ str_hashchange ] = function( fn ) { return fn ? this.bind( str_hashchange, fn ) : this.trigger( str_hashchange ); }; - + // Property: jQuery.fn.hashchange.delay - // + // // The numeric interval (in milliseconds) at which the // polling loop executes. Defaults to 50. - + // Property: jQuery.fn.hashchange.domain - // + // // If you're setting document.domain in your JavaScript, and you want hash // history to work in IE6/7, not only must this property be set, but you must // also set document.domain BEFORE jQuery is loaded into the page. This // property is only applicable if you are supporting IE6/7 (or IE8 operating // in "IE7 compatibility" mode). - // + // // In addition, the property must be set to the // path of the included "document-domain.html" file, which can be renamed or // modified if necessary (note that the document.domain specified must be the // same in both your main JavaScript as well as in this file). - // + // // Usage: - // + // // jQuery.fn.hashchange.domain = document.domain; - + // Property: jQuery.fn.hashchange.src - // + // // If, for some reason, you need to specify an Iframe src file (for example, // when setting document.domain as in ), you can // do so using this property. Note that when using this property, history // won't be recorded in IE6/7 until the Iframe src file loads. This property // is only applicable if you are supporting IE6/7 (or IE8 operating in "IE7 // compatibility" mode). - // + // // Usage: - // + // // jQuery.fn.hashchange.src = 'path/to/file.html'; - + $.fn[ str_hashchange ].delay = 50; /* $.fn[ str_hashchange ].domain = null; $.fn[ str_hashchange ].src = null; */ - + // Event: hashchange event - // + // // Fired when location.hash changes. In browsers that support it, the native // HTML5 window.onhashchange event is used, otherwise a polling loop is // initialized, running every milliseconds to // see if the hash has changed. In IE6/7 (and IE8 operating in "IE7 // compatibility" mode), a hidden Iframe is created to allow the back button // and hash-based history to work. - // + // // Usage as described in : - // + // // > // Bind an event handler. // > jQuery(window).hashchange( function(e) { // > var hash = location.hash; // > ... // > }); - // > + // > // > // Manually trigger the event handler. // > jQuery(window).hashchange(); - // + // // A more verbose usage that allows for event namespacing: - // + // // > // Bind an event handler. // > jQuery(window).bind( 'hashchange', function(e) { // > var hash = location.hash; // > ... // > }); - // > + // > // > // Manually trigger the event handler. // > jQuery(window).trigger( 'hashchange' ); - // + // // Additional Notes: - // + // // * The polling loop and Iframe are not created until at least one handler // is actually bound to the 'hashchange' event. // * If you need the bound handler(s) to execute immediately, in cases where // a location.hash exists on page load, via bookmark or page refresh for - // example, use jQuery(window).hashchange() or the more verbose + // example, use jQuery(window).hashchange() or the more verbose // jQuery(window).trigger( 'hashchange' ). // * The event can be bound before DOM ready, but since it won't be usable // before then in IE6/7 (due to the necessary Iframe), recommended usage is // to bind it inside a DOM ready handler. - + // Override existing $.event.special.hashchange methods (allowing this plugin // to be defined after jQuery BBQ in BBQ's source code). special[ str_hashchange ] = $.extend( special[ str_hashchange ], { - + // Called only when the first 'hashchange' event is bound to window. setup: function() { // If window.onhashchange is supported natively, there's nothing to do.. if ( supports_onhashchange ) { return false; } - + // Otherwise, we need to create our own. And we don't want to call this // until the user binds to the event, just in case they never do, since it // will create a polling loop and possibly even a hidden Iframe. $( fake_onhashchange.start ); }, - + // Called only when the last 'hashchange' event is unbound from window. teardown: function() { // If window.onhashchange is supported natively, there's nothing to do.. if ( supports_onhashchange ) { return false; } - + // Otherwise, we need to stop ours (if possible). $( fake_onhashchange.stop ); } - + }); - + // fake_onhashchange does all the work of triggering the window.onhashchange // event for browsers that don't natively support it, including creating a // polling loop to watch for hash changes and in IE 6/7 creating a hidden @@ -256,79 +256,79 @@ fake_onhashchange = (function(){ var self = {}, timeout_id, - + // Remember the initial hash so it doesn't get triggered immediately. last_hash = get_fragment(), - + fn_retval = function(val){ return val; }, history_set = fn_retval, history_get = fn_retval; - + // Start the polling loop. self.start = function() { timeout_id || poll(); }; - + // Stop the polling loop. self.stop = function() { timeout_id && clearTimeout( timeout_id ); timeout_id = undefined; }; - + // This polling loop checks every $.fn.hashchange.delay milliseconds to see // if location.hash has changed, and triggers the 'hashchange' event on // window when necessary. function poll() { var hash = get_fragment(), history_hash = history_get( last_hash ); - + if ( hash !== last_hash ) { history_set( last_hash = hash, history_hash ); - + $(window).trigger( str_hashchange ); - + } else if ( history_hash !== last_hash ) { location.href = location.href.replace( /#.*/, '' ) + history_hash; } - + timeout_id = setTimeout( poll, $.fn[ str_hashchange ].delay ); }; - + // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // vvvvvvvvvvvvvvvvvvv REMOVE IF NOT SUPPORTING IE6/7/8 vvvvvvvvvvvvvvvvvvv // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv $.browser.msie && !supports_onhashchange && (function(){ // Not only do IE6/7 need the "magical" Iframe treatment, but so does IE8 // when running in "IE7 compatibility" mode. - + var iframe, iframe_src; - + // When the event is bound and polling starts in IE 6/7, create a hidden // Iframe for history handling. self.start = function(){ if ( !iframe ) { iframe_src = $.fn[ str_hashchange ].src; iframe_src = iframe_src && iframe_src + get_fragment(); - + // Create hidden Iframe. Attempt to make Iframe as hidden as possible // by using techniques from http://www.paciellogroup.com/blog/?p=604. iframe = $('