I have the below javascript function that flashes the bg of a link 3 times when a new document is added to a list.
This works fine the first time, but subsequent calls to the function cause the flashing to become messed up. The more it's called the weirder the flashing behaviour becomes.
I am seeing the same effect in IE8 and the latest version of 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');
}
}