mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
Updating sample project
This commit is contained in:
@@ -6,10 +6,15 @@ var app = {
|
||||
document.addEventListener('deviceready', this.deviceready, false);
|
||||
},
|
||||
deviceready: function() {
|
||||
// note that this is an event handler so the scope is that of the event
|
||||
// so we need to call app.report(), and not this.report()
|
||||
app.report('deviceready');
|
||||
},
|
||||
report: function(id) {
|
||||
document.querySelector('#' + id + ' .pending').classList.add('hide');
|
||||
document.querySelector('#' + id + ' .complete').classList.remove('hide');
|
||||
report: function(id) {
|
||||
console.log("report:" + id);
|
||||
// hide the .pending <p> and show the .complete <p>
|
||||
document.querySelector('#' + id + ' .pending').className += ' hide';
|
||||
var completeElem = document.querySelector('#' + id + ' .complete');
|
||||
completeElem.className = completeElem.className.split('hide').join('');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user