這裏就是我定義我認爲事件:jQuery Mobile的+骨幹龍頭事件觸發兩次
events : {
"tap #exerciseProgressBarContainer" : 'progressBarClick'
},
這裏是動作:
progressBarClick : function() {
// start?
if(this.curWorkoutExercise.isTimed() && !this.curExerciseStartTime) {
HTMLHelper.endGlow(this.$('#exerciseProgressBarContainer .progressBar.overlay'));
this.startExerciseProgressTimer();
}
// done?
else {
this.stopExerciseProgressTimer();
// save the log
this.addCurExerciseLog();
this.startBreak();
this.nextAction();
}
},
基本上,第一個水龍頭,用戶啓動進度計時器,並在啓動後,另一個敲擊完成。我的iPhone和Android上發生的事情是點擊事件觸發兩次,同時啓動和停止進度條。任何想法,爲什麼發生這種情況,以及如何解決它?注意:我已經試過用vclick
替換tap
。
非常感謝!
我不工作的情況下傳播 –