Oleg Dats
Oleg Dats

Reputation: 4133

jQuery Mobile: how to open url hash with parameter?

I'm using jQuery Mobile 1.2.0

It's impossible to open hash with parameter.
Works - http://jquerymobile.com/demos/1.2.0/docs/pages/multipage-template.html#two
Doesn't work http://jquerymobile.com/demos/1.2.0/docs/pages/multipage-template.html#two?id=33

Upvotes: 0

Views: 318

Answers (2)

balazs
balazs

Reputation: 5788

It's not supported officialy, but there are workarounds. In the docs you can read more abot this (search for passing parameters under known limitations).

Quoting:

jQuery Mobile does not support query parameter passing to internal/embedded pages but there are two plugins that you can add to your project to support this feature. There is a lightweight page params plugin and a more fully featured jQuery Mobile router plugin for use with backbone.js or spine.js. A newer plugin called routerlite keeps it simple with just four methods: routeinit, routechange, pageinit and pagechange.

Upvotes: 1

Edwin
Edwin

Reputation: 11

If you want to do this to be able to pass variables around in a jquery mobile project, you can also use global variables in javascript or use localstorage / cookies.

Upvotes: 0

Related Questions