Confused over simplest of things....

Confused over simplest of things....

Relatively new to jquery and confused over a simple thing here;

I am developing a single html file multi page webapp. I have a number of 'pages' defined using data-role="page" and an id, each with a header and footer. I have buttons inside and can navigate between them using buttons with;

  1. <a href="#menu" data-role="button">Home</a> 

What I am trying to figure out is how to go to a page without using a button - following some event.

I started to use

  1. .mobile.changePage("#menu");

which seemed to work - but then read that it was deprecated ...then found

  1. $( ":mobile-pagecontainer" ).pagecontainer( "change", "#menu", { role: "dialog" } ); 

which doesn't work...and to be honest I don't really understand the command either - should I have defined a 'container'?


Am I trying to do something difficult? In my mind it's the most simplest of things - move to another page??

Can anyone help me please.

Phil