var $allLinks = $("a"); $allLinks.click(function() { $allLinks.not(this).css("color", "red"); });