This is looping in a timeout function. The nw remains undefined or is reset to undefined again at each new start. Why is that?
$("#wert"+i).load('variable.html #w'+i);
if(! nw){
alert(nw);
var nw = eval('neuerwert'+i); // Here I set the var nw, so why is it undefined again the next time around?
}
if ($("#w"+i).html() != nw){
wertaenderung('#wert'+i);
nw = $("#w"+i).html();
};