Inside my index.html, I have this button that goes to about.html when tapped.
<div class="col-50">
<a href="about.html">
<div class="button">About</div>
</a>
</div>
And on about page, I would like to detect whenback button is tapped and that I am now on my index.html page.
Here's what I've tried:
First attempt:
myApp.onPageInit('index', function (page) {
myApp.alert("test");
});
Second attempt:
myApp.onPageInit('index', function (page) {
myApp.alert("test");
}).trigger();
Did you try:
Do not forget the
data-page="about"attribute in youraboutpage.