【发布时间】:2017-05-24 13:57:24
【问题描述】:
我想显示我拥有的动画并从 DOM 中删除元素,但是通过删除 this 动画不会显示。
我曾尝试使用setTimeout() 函数,但由于我需要针对特定元素,我无法弄清楚如何让两者都执行!
代码如下:
function anagramHitsTheBottom () {
$('.anagram').each(function () {
const position = Math.round($(this).position().top);
if (position >= 450) {
console.log(lifeScore);
lifeScore -= 1;
$lives.html(Lives Left: ${lifeScore});//Not Working
$(this).css('color','red');
$(this).addClass('animated hinge');
$(this).remove();
}
});
}
请忽略我没有在 ${} 中使用反引号,我知道我需要它们!
【问题讨论】:
标签: javascript jquery html css animate.css