passing parameter between multipage jquerymobile website
Hi,
I don't understand how to solve this.
I have a single html index file with multi page navigation menu.
<li><a id="nav_getGtc" class="ui-btn ui-shadow ui-corner-all ui-btn-icon-left" lang="en" data-ajax="false" href="#gtc?cat=2"></a></li>
<li><a id="nav_getGtc" class="ui-btn ui-shadow ui-corner-all ui-btn-icon-left" lang="en" data-ajax="false" href="#gtc?cat=1"></a></li>
<li><a id="nav_getGtc" class="ui-btn ui-shadow ui-corner-all ui-btn-icon-left" lang="en" data-ajax="false" href="#gtc?cat=3"></a></li>
<li><a id="nav_getGtc" class="ui-btn ui-shadow ui-corner-all ui-btn-icon-left" lang="en" data-ajax="false" href="#gtc?cat=4"></a></li>
And in my js file I do this :
$(document).on( "pageshow", "#gtc", function( e ) {
var passedId = (($(this).data("url").indexOf("?") > 0) ? $(this).data("url") : window.location.href ).replace( /.*cat=/, "" );
$.mobile.navigate( "#gtc");
findAll_gtc(passedId);
});
The first time it works, but if I click on another link, it doesn't work.
I do not navigate a new time on the #gtc id page (of course, the page was already shown/loaded), what will be the trick to grab this event each time I click on another category ?
Thank you very much