You should refer to the current element and not all elements matching your selector.
$("#mainMenu td").click(function() {
$(this).css('background-color', '#EDEDED');
});
I´d also recommend you to use CSS classes instead of setting the CSS properties this way.
That would be something like;
$("#mainMenu td").click(function() {
$(this).addClass('selected');
});
together with;
#mainMenu td.selected {
background-color: #EDEDED; }