$(document).ready(function(e) { $('.menu li').click(function(e) { $('.menu li').css({backgroundColor:''}); $(this).css({backgroundColor:'red'}); });});