I have a javascript method which accepts the transition name as a parameter and passes it to jquery.mobile for changing page:
$.mobile.changePage(renderedPage, { transition: transition, reverse: reverse });
Now I need to check if the transition name passed to my method is a valid transition. (this is because invalid transition name will cause a break in .changePage() method)
I browsed the source code of jquery.mobile but could not find a collection that contains all transition names or transition handlers.
Anybody has a trick to do this?
In jquery mobile, there are only six transitions available. you could just make sure that the given transition is in the array of available transitions.
http://jquerymobile.com/demos/1.0a4.1/docs/pages/docs-transitions.html
However, i was unable to find an array or object in the core that directly referenced these transitions in a way that we could use to dynamically build this array.