Call function when app page loads
Hello:
I am developing a mobile app using Cordova, but right now I'm simply working on the HTML, JS, and CSS files.
When the app opens, it will first just come to my "home" section. I have a button that will open the left Panel, and from there, if I click the "Programs" item, then it will fire my function which displays my listview (it does this in this HTML page at the "<div id="divShow"></div>") . Here is my home section:
- <section data-role="page" id="home">
- <aside data-role="panel" data-display="overlay" id="homeAside">
- <h3></h3>
- <ul data-role="listview">
- <li><a href="#home" id="btnShowProgs">Programs</a></li>
- <li><a href="#" id="btnShowRoutines">Routines</a></li>
- <li><a href="#" id="btnShowExLog">Excercise Log</a></li>
- <li><a href="#" id="btnShowEatLog">Eating Log</a></li>
- <li><a href="#" id="btnShowProfile">Profile</a></li>
- </ul>
- </aside>
- <header data-role="header" data-position="fixed" >
- <a href="#homeAside" data-role="button" data-iconpos="notext" data-icon="bullets">Close</a>
- <h2>
- App Name
- </h2>
- </header>
- <article role="main" class="ui-content">
- <div id="divShow"></div>
- </article>
- <footer data-role="footer" data-position="fixed">
- <h4>
- <!--Copyright © 2016 myApps.biz-->
- </h4>
- </footer>
- </section>
Basically I would like to have it call the div "divShow" when the page loads, like it does when I click the "Programs" list item from my left Panel (<aside>)
Thanks for any pointers!!