I'm currently using jquery-animate-colors to animate the flashing of a border, but I think my code could use some cleanup. What's a better way to approach the following?
highlightRow = function(row, count) {
if (count == null) {
count = 0;
}
$(row).animate({
"border-color": "#3737A2"
}, {
duration: 250,
complete: function() {
return $(row).animate({
"border-color": "#FFFFFF"
}, {
duration: 250,
complete: function() {
if (count === 0) {
return highlightRow(row, count += 1);
}
}
});
}
});
};
So I'm trying to have this just flash the border color on and off twice. I found that trying to animate border-color
, you can't use anything besides hex codes. transparent
and none
both don't animate anything at all.
Anyways, looking for some help to clean this up! Thanks ahead :)