I\'m looking for a way to do the following.
I add a
If you don't want the overhead of jQuery UI, I recently wrote a recursive solution using Of course you'll need the color plugin to get And to provide a bit of context this is how I called it. I needed to scroll the page to my target div and then blink it.
.animate(). You can customize the delays and colors as you need.function doBlink(id, count) {
$(id).animate({ backgroundColor: "#fee3ea" }, {
duration: 100,
complete: function() {
// reset
$(id).delay(100).animate({ backgroundColor: "#ffffff" }, {
duration: 100,
complete: function() {
// maybe call next round
if(count > 1) {
doBlink(id, --count);
}
}
});
}
});
}
backgroundColor to work with .animate().
https://github.com/jquery/jquery-color$(window).load(function(){
$('html,body').animate({
scrollTop: $(scrollToId).offset().top - 50
}, {
duration: 400,
complete: function() { doBlink(scrollToId, 5); }
});
});