/ Published in: jQuery
                    
                                        
Requires jQuery Color plugin
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
(function($) {
$.fn.pulse = function(options) {
options = $.extend({
fadeFrom: "#87ff9b",
fadeTo: "#FFFFFF"
}, options);
return this.each(function() {
var current = $(this);
setInterval(function () {
$(current).animate({'backgroundColor' : options.fadeFrom},1000)
.animate({'backgroundColor' : options.fadeTo},1000)
}, 1);
});
}
})(jQuery);
$(document).ready(function(){
$(this).pulse({"fadeFrom":"#87ff9b"});
});
Comments
 Subscribe to comments
                    Subscribe to comments
                
                