diff --git a/clients/anim/main.js b/clients/anim/main.js index 62d6274..154ecc2 100644 --- a/clients/anim/main.js +++ b/clients/anim/main.js @@ -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) {