Page 1 of 1

Run JS when device ready

Posted: Mon Oct 14, 2013 12:30 pm
by Galaxy Lam

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.


Run JS when device ready

Posted: Mon Oct 14, 2013 12:40 pm
by Kateryna Grynko

Hi,

Do you test on a real device?


Run JS when device ready

Posted: Mon Oct 14, 2013 2:28 pm
by Galaxy Lam

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 !


Run JS when device ready

Posted: Mon Oct 14, 2013 4:13 pm
by Maryna Brodina

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...