Fix for uncaught refereceErr
-
Added try/catch to wp-content/plugins/wp-fade-in-text-news/wp-fade-in-text-news.js This disables the timer the first time you get the referenceErr.
function FadeIn_Ontimer() {
/*
* try/catch inserted to eliminate js errors on pagest that do not include
* this widget. We take one, and disable the timer.
* RK 9/26/2014
*/
` try{
if (FadeIn_bFadeOutt) {
FadeIn_Fade+=FadeIn_FadeStep;
if (FadeIn_Fade>FadeIn_FadeOut) {
FadeIn_Cursor++;
if (FadeIn_Cursor>FadeIn_Max)
FadeIn_Cursor=0;
FadeIn_SetFadeLink();
FadeIn_bFadeOutt = false;
}
} else {
FadeIn_Fade-=FadeIn_FadeStep;
if (FadeIn_Fade<FadeIn_FadeIn) {
clearInterval(FadeIn_FadeInterval);
setTimeout(Faderesume, FadeIn_FadeWait);
FadeIn_bFadeOutt=true;
}
}
var ilink = document.getElementById(“FadeIn_Link”);
if ((FadeIn_Fade<FadeIn_FadeOut)&&(FadeIn_Fade>FadeIn_FadeIn))
ilink.style.color = “#” + ToHex(FadeIn_Fade);
}
catch(e){
clearInterval(FadeIn_Ontimer);
}
}`
- The topic ‘Fix for uncaught refereceErr’ is closed to new replies.