0
我正在努力顯示自然消失的消息。 5秒後,消息欄自行解除。但是,當顯示多條消息時,一旦顯示的消息欄被解除,行爲就是在同一個容器中顯示多條消息。如何在javascript中的已定時函數中設置超時值
爲此, 一旦我表現出與第一條消息了吧,這是後5秒
window.setTimeout(function() {
bar.getValue('isVisible').setValue(false);
this.clearMessage(bar);// clears the message
bar._isShowing = false;
setTimeout(function() {
//execute the last action in the queue (if any)
dequeueAction(); fires the next message in queue.
}, 100);
}, 3000);
我的問題是,當存在被前率先打響另一消息德代碼自行解散消息自行解散,我正在排隊。但是,我希望在解除第一條消息和顯示隊列中的第二條消息之間有相當長的時間。但是,延遲顯示第二條消息的超時不起作用,因爲它已經在3000毫秒以內的時間內
我怎麼能在解僱第一條消息和顯示第二條消息方面做出延遲? 注意:它沒有第二個setTimeout,但它沒有延遲。
任何幫助將不勝感激。
那不是3000秒,它是3000毫秒,這隻有3秒。 –
是的,我明白。那是一個錯字。 – emeryville
不用擔心,只是檢查。 –