Train Catalog App
Last updated
Last updated
This sample app is a train catalog which displaying the types trains towards Tokaido and Tohoku areas.
Import Train Catalog App to your Monaca Account
Tested Environment
Android 11.0
iOS 14.3
jQuery Mobile
This sample uses the native function of Monaca. Therefore, there are multiple HTML pages. First, here is the body of the index.html
.
This sample uses jQuery Mobile to display the list screen. Once you tap each column, showDetail
function is called. This function will transit to the next page, which will be described later. Also a
tag uses monaca.invokeBrowser
function in onclick
attributes. This function is used to launch the browser and display the specified URL.
The JavaScript code of the Top Screen is not long.
As mentioned before, showDetail
is called when the column in the list is tapped. Take 2 arguments and assign them tofilename
variable and trqinname
variable.
Display the next page with monaca.pushPage
function. This function will open a new page natively by using Monaca native functions and the variable passed to the next page is defined in its third argument. The passed value can be obtained by monaca.queryParams
variable.
File
Description
index.html
The startup page
css/style.css
The stylesheet file for the application
images/*.jpg
Image files used in this application