Galaxy Lam
Posts: 0
Joined: Mon Oct 14, 2013 12:30 pm

Run JS when device ready

I would like to run a JS when device ready, but it didn't work.
-- startScreen ,Device ready,1. Run JavaScript,Handler: alert("Test!");
-- any step I have missed? Could you please help? thanks.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Run JS when device ready

Hi,

Do you test on a real device?

Galaxy Lam
Posts: 0
Joined: Mon Oct 14, 2013 12:30 pm

Run JS when device ready

Not yet, then how can I test it on browser first? Should I use "load" instead?
May I know is there any difference between the event of "load" and "device ready" ?
Many thanks !

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Run JS when device ready

Hello! You can test on emulator. You can also test action on load event first and when you're ready to test app on device move action to device ready event. You can find more information on these events online http://api.jquerymobile.com/pageload/
http://docs.phonegap.com/en/2.9.0/cor...

Return to “Issues”