I just started developing a Cordova app and added jQuery. The default application that loads up when you create a project contains javascript code that attaches a method to the deviceready event only after all other javascript files have been loaded. With Cordova, can something like this be replaced with $(document).ready(function() { });
like with normal web development? Or is the deviceready event special for Cordova and needs to be used?
Asked
Active
Viewed 67 times
0

jchitel
- 2,999
- 4
- 36
- 49
-
Read http://learn.jquery.com/using-jquery-core/document-ready/ – Tushar Gupta - curioustushar Nov 04 '13 at 14:36
-
1possible duplicate of [JQuery document.ready vs Phonegap deviceready](http://stackoverflow.com/questions/12576062/jquery-document-ready-vs-phonegap-deviceready) – Shoaib Chikate Nov 04 '13 at 14:42
1 Answers
0
Cordova or phonegap is related to applications developed for mobile app. So obivously we will have onDeviceReady as main starting function in which we are able to write code that need to execute when mobile device get ready.
Check this for your answer and also this Phonegap documentation for detail understanding

Community
- 1
- 1

Shoaib Chikate
- 8,665
- 12
- 47
- 70