$.fn.highlight = function(color) {
color = color || 'yellow';
return this.each(function() {
$(this).css('background', color);
});
};
// Usage
$('p').highlight();
$('h2').highlight('#cce');Always return this so the plugin supports chaining.