I have recently started developing for WP8 platform. My app works perfectly with android and iOS phones.
index.html
<a id="fail" href="#page2" onclick="alert('test');">Page 1 link</a>
index.js
$('#fail').click();
Issue
I can see the alert box in the WP8 phone but my phone do not redirect the JQM page with id page2. However when I manually touch/tap the link "Page 1 link" , I get the popup alert and after that I get redirected to page 2 as expected.
Please let me know the solution if you are aware of the same. I am literally frustrated with this issue for the past 9 hours :(
Although I have found out some work around by using :
$(":mobile-pagecontainer").pagecontainer("change", "#page2", { transition: "slideup" });
But changing so much code in my large scale app will be another problem as I plan to maintain uniform code base for all 3 environments. :(
According to Content security policy try to add unsafe-inline to default-src to enable inline JavaScript.