1
새 문서가 목록에 추가되면 링크의 bg를 세 번 깜박이는 javascript 함수가 있습니다.jQuery backgroundColor animation weirdness
처음에는 문제가 없지만 함수를 호출하면 깜박임이 엉망이됩니다. 깜박이는 동작이 더 이상하다고 할수록 더 이상합니다.
IE8과 최신 버전의 Chrome에서 동일한 효과가 나타납니다.
var highlightNew = function (control) {
var item = $('li.new-document a.document-link', control);
if (item.length > 0) {
var highlightColor = '#ffa500';
item.stop()
.animate({ backgroundColor: highlightColor }, 'slow')
.animate({ backgroundColor: 'transparent' }, 'slow')
.animate({ backgroundColor: highlightColor }, 'slow')
.animate({ backgroundColor: 'transparent' }, 'slow')
.animate({ backgroundColor: highlightColor }, 'slow')
.animate({ backgroundColor: 'transparent' }, 'slow');
}
}
당신이 함께가는 약간의 HTML을 게시 할 수 있습니까? –
이 다른 질문을 확인하십시오 (중복 가능합니까?) http://stackoverflow.com/questions/190560/jquery-animate-backgroundcolor –
어떻게 부르시겠습니까? –