我正在用jquery制作一個(gè)phonegap應(yīng)用程序。我很困惑我是否應(yīng)該換我整個(gè)里面的代碼jQuery的$(document).ready()像$(document).ready(function(){ //mycode});或在phonegap的deviceready事件中,例如document.addEventListener("deviceready", function(){ //mycode});我目前正在使用,document.ready但我想如果嘗試訪問其中的某些Phonegap API方法,可能會(huì)遇到問題document.ready。將我的代碼包裝在document.ready或deviceready中是最好的事件?
jQuery document.ready與Phonegap deviceready
慕姐8265434
2019-12-26 10:20:24