azicchetti / jquerymobile-router

A router/controller for jquery mobile. Also adds support for client-side parameters in the hash part of the url. The routes handles regexp based routes. This plugin can be used alone or (better) with Backbone.js or Spine.js, because it's originally meant to replace their router with something integrated with jQM.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Same page example

scruffian opened this issue · comments

Hi

I am trying to change the content of my page based on passing some parameters to the router. I have been looking at the same page example, but I am having a couple of problems:

  1. I want to stop the default animation, so that the page doesn't fade in/out.
  2. The page seems to lose its active state on the second time I navigate to it.

I wonder if I am doing this the wrong way?

Thanks
Ben

Hi,
in order to stop the default animation, the anchor you're using to link the page should contain the data-transition="none" attribute.

For example:

<a href="#yourpage?param=value2&param2=value2" data-transition="none">yourpage</a>

I'm afraid I don't get the second question, what do you mean for losing the active state? Something related to the ui-btn-active class of navbar buttons?

brilliant, thank you. how stupid of me to have not realised! the other problem is fixed now with this too...