Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yes, parameters on the hash are not supported by default. I've been using the following plugin to give me that, and it's been working pretty good so far ;-)</p> <p><a href="https://github.com/jblas/jquery-mobile-plugins/blob/master/page-params/jqm.page.params.js">jqm.page.params</a></p> <p>UPDATE - HOW TO USE:</p> <p>I've added the following code after including jqm.page.params.js:</p> <pre><code>$(document).bind("pagebeforechange", function( event, data ) { $.mobile.pageData = (data &amp;&amp; data.options &amp;&amp; data.options.pageData) ? data.options.pageData : null; }); </code></pre> <p>So for example, a page getting called like: index.html#search?id=mysearchkeyword Can now access this information in ANY page event I feel like:</p> <pre><code>$(document).on("pagebeforeshow", "#firstpage", function(e, data){         if ($.mobile.pageData &amp;&amp; $.mobile.pageData.id){             console.log("Parameter id=" + $.mobile.pageData.id);         }  }); </code></pre> <p>Would print "mysearchkeyword" to your logging console.</p> <p>Hope this helps!</p> <p>PS: Note that I am no way affiliated with the plugin or it's author</p> <p><strong>Editors Note:</strong> The author had this as second code block. In Jquery 1.9, live is removed so i updated his sample above with a .on syntax instead. Here is the original:</p> <pre><code>$("#firstpage").live("pagebeforeshow", function(e, data){ if ($.mobile.pageData &amp;&amp; $.mobile.pageData.id){ console.log("Parameter id=" + $.mobile.pageData.id); } }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload