[COLOR=#BBC0C4 !important][COLOR=#6A737C !important]I'm trying to use Hyphenator but I have a problem, I work for a publishing and I'm developing the book as webbApp, the book is divided into blocks that are loaded in appendix to the scroll of the page; Hyphenator calls it at the top of the page and works the first time; how do I do it when I scroll down the page to spell out the new blocks that are added to the append? At the moment with my function or simple onClick gives me the Warning: multiple execution of Hyphenator.run () - This may slow down the script! and the third time I scroll the page blocks me everything.
[/COLOR]
[/COLOR]
function sillabare(){
console.log("INIZIO SILLABAZIONE");
var ultimaPos=-1;
var eseguito=false;
setInterval(function(){
//console.log("inizio1",inizio);
var currPos=scrollY;
if(ultimaPos!= currPos){
// Hyphenator.stopPropagation();
console.log("entrato!");
Hyphenator.run();
ultimaPos=currPos;
}
},1000);}
This is my function that tries to execute Hyphenator only when I stop at a new point on the page, only so when I stop it re-runs hyphenator again giving me the warning! Help !!