Skip to content

Commit

Permalink
fixed weather sample on cordova
Browse files Browse the repository at this point in the history
  • Loading branch information
mangini committed Dec 30, 2013
1 parent 5584462 commit f52464f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions weather/weather.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,11 +654,13 @@ function init() {
});
}

if (typeof cordova !== 'undefined') {
document.addEventListener("deviceready", init);
} else {
$(document).ready(init);
}
$(document).ready(function() {
if (typeof cordova !== 'undefined') {
document.addEventListener("deviceready", init);
} else {
init();
}
});

/******************************************************************************/
/******************************************************************************/
Expand Down

0 comments on commit f52464f

Please sign in to comment.