Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

6. The Framework and JavaScript > Custom Transitions

Custom Transitions

In Chapter 3 we have already mentioned all the possible transitions available in jQuery Mobile 1.0. Can we define our own transitions? Yes we can, and there are two ways:

  • Using CSS3 animations

  • Using JavaScript

When we define a data-transition attribute (or by applying a transition from JavaScript), jQuery Mobile first verifies if the name is one of the transitions available in the framework. If not, it looks inside a collection called $.mobile.transitionHandlers. If the transition is unknown and not defined in the collection, a default transition is used.

The default transition can be changed, and must be defined as a handler function. By default, the fallback transition is mapped to a custom transition that must be defined in CSS3 animations (see next chapter).


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial