Dancer
Dancer

Reputation: 17651

Jquery Mobile - Script page navigation / Transition

Is it possible to trigger a page navigation/transition via code rather than a physical button using JQuery Mobile - I need a script to re-direct a page according to logic and would like it to navigate using the flow transition.

Cheers

Upvotes: 0

Views: 1020

Answers (2)

geoyws
geoyws

Reputation: 3687

$.mobile.changePage('URL', { options } ); is deprecated now. http://api.jquerymobile.com/jQuery.mobile.changePage/

The proper way would be to use:

  1. $.mobile.navigate("#bar", {transition: "slide", info: "info about the #bar hash"});
  2. $.mobile.pageContainer.pagecontainer("change", "target", {transition: "flow", changeHash: false, reload: true})

Just thought I'd answer this question from what I've learnt from the other threads. I don't have enough reputation to put up the rest of the links. Just search the code up on Google to find their respective StackOverflow threads.

Upvotes: 0

Porwal
Porwal

Reputation: 330

Yes! It is possible using $.mobile.changePage('URL', { options } );

Go through the link

Upvotes: 1

Related Questions