增加数值变化动画

This commit is contained in:
dd 2021-12-22 13:54:59 +08:00
parent 8f32010b5d
commit 5837d6fd5a
5 changed files with 15 additions and 3 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -36,11 +36,23 @@
client.on('message', function (topic, message) { client.on('message', function (topic, message) {
var objmsg = $.parseJSON(message.toString()); var objmsg = $.parseJSON(message.toString());
$('#id' + objmsg.VarId + '_Value').text(objmsg.Value); $('#id' + objmsg.VarId + '_Value').text(objmsg.Value);
//$('#id' + objmsg.VarId + '_Value').addClass('fadeIn animated'); $('#id' + objmsg.VarId + '_Value').addClass('animated bounce');
setTimeout(function(){
$('#id' + objmsg.VarId + '_Value').removeClass('bounce');
}, 500);
$('#id' + objmsg.VarId + '_CookedValue').text(objmsg.CookedValue); $('#id' + objmsg.VarId + '_CookedValue').text(objmsg.CookedValue);
//$('#id' + objmsg.VarId + '_CookedValue').addClass('fadeIn animated'); $('#id' + objmsg.VarId + '_CookedValue').addClass('animated bounce');
setTimeout(function(){
$('#id' + objmsg.VarId + '_CookedValue').removeClass('bounce');
}, 500);
$('#id' + objmsg.VarId + '_StatusType').text(objmsg.StatusType); $('#id' + objmsg.VarId + '_StatusType').text(objmsg.StatusType);
//$('#id' + objmsg.VarId + '_StatusType').addClass('fadeIn animated'); $('#id' + objmsg.VarId + '_StatusType').addClass('animated bounce');
setTimeout(function(){
$('#id' + objmsg.VarId + '_StatusType').removeClass('bounce');
}, 500);
//$('#id' + objmsg.VarId + '_Value').addClass('fadeIn animated');
}) })
} }
</script> </script>