jQuery Mobile Framework
Find a file
Kin Blas 19c06952fd Changes to allow 3rd party transitions. Developers can now register a custom transition by adding their transition handler to the $.mobile.transitionHandlers dictionary. The name of the custom transition is used as the key within the transtionsHandlers dictionary, and should be the same name used within the @data-transtion attribute.
The expected prototype for a transitionHandler is as follows:

function handler(name, reverse, $to, $from)

The name parameter is the name of the transition as specified by @data-transition attribute, reverse is a boolean that is false for a normal transition, and true for a reverse transition. The $to param is a jQuery collection containing the page that is being transitioned "to", and $from is an optional collection that tells us what page we are transitioning "from". Because $from is optional, handler developers should take care and check $from to make sure it is not undefined before attempting to dereference it.

In addition to registering custom transition by name, developers can specify a handler to use in the case where a transition name is specified and does not exist within the $.mobile.transitionHanlders dictionary. Within jQuery Mobile, the default handler for unknown transition types is the $.mobile.css3Transition() handler. This handler always assumes that the transition name is to be used as a CSS class to be placed on the $to and $from elements. To change the default handler, simply set $.mobile.defaultTransitionHandler to you function handler:

$.mobile.defaultTransitionHandler = myTransitionHandler;

The changes to make all this necessary are as follows:

- Created $.mobile.noneTransitionHandler which is the default transitionHandler for the framework that simply adds and removes the page active class on the $from and $to pages with no animations.

- Moved class based transition code into a new plugin jquery.mobile.transition.js file. This plugin, when present, overrides the noneTransitionHandler as the defaultTranstionHandler for the framework so that CSS3 animation transitions are available.

- Removed code related to the setting/removal of the ui-mobile-viewport-perspective class. The css3TransitionHandler plugin takes care of automatically placing a "viewport-<transition name>" class on the viewport (body) element. This allows any other transition to specify properties on the viewport that are necessary to accomplish the transition.

- changed the CSS class ui-mobile-viewport-perspective to viewport-flip to match code changes. This makes it more apparent that setting -webkit-perspective is only used with the flip transition.

- Updated js/index.php, Makefile and build.xml to include the new jquery.mobile.transition.js file.
2011-04-26 14:06:10 -07:00
build updating compiler 2011-04-14 16:43:57 -04:00
docs Fixed a typo, thanks Steven. 2011-04-18 17:35:27 -07:00
experiments been meaning to do this for a while. 2011-04-14 16:04:47 -04:00
external [astounding] fixed css that locked ie in the navigation unit tests. tagged so I can show my kids some day 2011-04-08 22:04:06 -07:00
js Changes to allow 3rd party transitions. Developers can now register a custom transition by adding their transition handler to the $.mobile.transitionHandlers dictionary. The name of the custom transition is used as the key within the transtionsHandlers dictionary, and should be the same name used within the @data-transtion attribute. 2011-04-26 14:06:10 -07:00
tests Changes to allow 3rd party transitions. Developers can now register a custom transition by adding their transition handler to the $.mobile.transitionHandlers dictionary. The name of the custom transition is used as the key within the transtionsHandlers dictionary, and should be the same name used within the @data-transtion attribute. 2011-04-26 14:06:10 -07:00
themes Changes to allow 3rd party transitions. Developers can now register a custom transition by adding their transition handler to the $.mobile.transitionHandlers dictionary. The name of the custom transition is used as the key within the transtionsHandlers dictionary, and should be the same name used within the @data-transtion attribute. 2011-04-26 14:06:10 -07:00
.gitignore add compiled and gitstatus.log to gitignore 2011-04-13 23:37:59 -07:00
.htaccess updated kill cache settings 2010-11-09 18:06:44 -05:00
build.xml Changes to allow 3rd party transitions. Developers can now register a custom transition by adding their transition handler to the $.mobile.transitionHandlers dictionary. The name of the custom transition is used as the key within the transtionsHandlers dictionary, and should be the same name used within the @data-transtion attribute. 2011-04-26 14:06:10 -07:00
combine.php Fixed 413 - Dev issue: our .htaccess file on the server is doing a 301 redirect which is causing css and image loading issues. 2010-11-09 13:58:28 -08:00
gitposthook.php change file permissions for git hooks 2011-04-14 12:01:27 -07:00
gitpushlatest.php change file permissions for git hooks 2011-04-14 12:01:27 -07:00
index.html been meaning to do this for a while. 2011-04-14 16:04:47 -04:00
Makefile Changes to allow 3rd party transitions. Developers can now register a custom transition by adding their transition handler to the $.mobile.transitionHandlers dictionary. The name of the custom transition is used as the key within the transtionsHandlers dictionary, and should be the same name used within the @data-transtion attribute. 2011-04-26 14:06:10 -07:00
README.md updated the readme with more helpful information 2011-01-31 22:11:28 -05:00
version.txt set version to 1.0a4.1 2011-04-07 16:55:05 -04:00

jQuery Mobile Framework

http://jquerymobile.com

Demos and documentation

http://jquerymobile.com/test/

How to build your own jQuery Mobile CSS and JS files

Clone this repo and build the js and css files (you'll need Git and Make installed):

git clone git://github.com/jquery/jquery-mobile.git
cd jquery-mobile
make

Two complete versions, one minified, one not, of jQuery Mobile js and css files will be created.

Submitting bugs

If you think you've found a bug, please visit the Issue tracker (https://github.com/jquery/jquery-mobile/issues) and create an issue explaining the problem and expected result. Be sure to include any relevant information for reproducing the issue, such as the browser/device (with version #), and the version of the jQuery Mobile code you're running. It also helps a lot to make sure that the bug still exists on jquerymobile.com/test/, as it's possible we may have fixed it already!

Submitting patches

To contribute code and bug fixes to jQuery Mobile: fork this project on Github, make changes to the code in your fork, and then send a "pull request" to notify the team of updates that are ready to be reviewed for inclusion.

Running the jQuery Mobile demos & docs locally

To preview locally, you'll need to clone a local copy of this repository and point your Apache & PHP webserver at its root directory (a webserver is required, as PHP and .htaccess are used for combining development files).

If you don't currently have a webserver running locally, there are a few options. If you're on a Mac, you can try dropping jQuery Mobile into your sites folder and turning on Web Sharing via System Prefs. From there, you'll find a URL where you can browse folders in your sites directory from a browser.

Another quick way to get up and running is to download and install MAMP for Mac OSX. Once installed, just open MAMP, click preferences, go to the Apache tab, and select your local jQuery Mobile folder as the root. Then you can open a browser to http://localhost:8888 to preview the code.

Another alternative is XAMPP, which is also available for Windows, though you need to actually modify Apache's httpd.conf to point to your checkout: http://www.apachefriends.org/en/xampp.html You need the Rewrite (mod_rewrite.so), Expire (mod_expires.so) and Header (mod_headers.so) modules loaded.