I'm doing an ios web app using Cordova
and JQuery
. I create the index.html which has a 3-row list view. when the row is clicked, the page will change to another page.html. According to the clicked row, the JS will ask data from the server and refresh the page.html.
Now My Question is what is the best practice to implement it? I mean which is the regular style to do it as I'm fresh to the front-end.
Currently I add the anchor in index.html:
<li><a href="page.html">A Header Bars</a></li>
However, I meet problems:
- I don't know how to get the clicked row information in page.html
In page.html, how I can start a request to fetch the data? In page.html, I write:
$(document).ready(function() { console.log("test"); document.write("page test"); })
But it is not called.
Thanks.