Take the following example_
Page 1: User needs to enter a Password
Page 2 (serverside switch)
---> Password ok -> transition should be 'slide' to the next page generated on the server
---> Password wrong -> transition should be 'flip' to inform him that the password is wrong
Currently I need to to this with ajax to check on the server, and then use changePage() to go to the right next page and use the corresponding transition effect.
The problem is that 'data-transition' is defined on the link and i cannot change it depending on what i get from the server.
My Idea:
Since jQm loads the new page and puts the contents in the current DOM, there should be an option to set data-transition on the data-role='page' div this would it make a lot simpler like
<div data-role="page" data-transition="pop"
> ... </div>
jQm would the load the new page with ajax and see this attribute, create the new page in DOM and then use the selected effect to show the loaded page. If 'data-transition' is defined on the link then this has precedence of course.
Another example would be a "setup/change settings" page, this page would have transition 'slide-down' hardcoded into the page and every link or changePage() pointing to that setup page would then use this transition, in that way i just can link to that page without needing to repeat the effect on every link.