fade session text

This commit is contained in:
Micho 2013-05-21 17:52:37 +02:00
parent 95875ecfe6
commit da55871041
1 changed files with 16 additions and 1 deletions

View File

@ -181,7 +181,22 @@ function updateData() {
}
}
});
for (var i = 1; i <= 7; i++) $('#stage'+i).html(stages[i]);
for (var i = 1; i <= 7; i++) (function () {
var node = $('#stage'+i);
var oldText = node.attr('oldText');
var newText = stages[i];
node.attr('oldText', newText);
if (oldText != newText) {
if (mouseDrag) {
node.html(newText);
} else {
node.stop(true);
node.fadeOut(100, function () { node.html(newText); });
node.fadeIn(100);
}
}
})();
data.matrix.forEach(function (times, index) {