[niveau: intermédiaire]
Si vous souhaitez créer un effet highlight sur un élément (en passant le background en jaune par exemple), voici comment il faut s’y prendre :
jQuery.prototype.highlight = function() { jQuery(this).css("background-color","yellow").fadeTo('slow', 0.1, function() { jQuery(this).fadeTo('slow', 1.0, function() { jQuery(this).css("background-color","white"); }); }); }; jQuery('#mon-element').highlight();