2013-04-04 63 views
0

當我運行以下內容時,我立即在指定的覆蓋文本的區域中看到「Five」。 (我預計會看到「一」,然後「兩」等)我錯過了什麼?Popcorn.js設置多個提示()

document.addEventListener("DOMContentLoaded", function() { 
    putHere = document.getElementById("putHere"); 
    pop = Popcorn("#side1"); // Create a popcorn instance 

    var states = function() { 
    var rdy = pop.readyState(); 
    if (rdy !== 4) setTimeout(states, 10); 
    else { 
     pop.cue(12, layover("One")); 
     pop.cue(168, layover("Two")); 
     pop.cue(336, layover("Three")); 
     pop.cue(506, layover("Four")); 
     pop.cue(703, layover("Five")); 
    } 
    } 
    states(); 
}, false); 

回答

0

尋求在IRC的幫助下,到pop.cue線更改爲建議:

pop.cue(12, function() {layover("One"); }); 
pop.cue(168, function() {layover("Two"); }); 
pop.cue(336, function() {layover("Three"); }); 
pop.cue(506, function() {layover("Four"); }); 
pop.cue(703, function() {layover("Five"); }); 

工作。

(現在看看他們爲什麼在Chrome中工作,但不是Firefox ......)