how Could I write this more concisely?
This is the list of buttons, all of them do the same thing, changing some css property, but in the different places
$('#right-panel li:nth-child(1)').click(function() {
$('#pom03par01WraperAbsolute').css('display','block');
$(this).css('background','#adff84');
$('.par01table').css('background','#adff84');
return false;
});
$('#right-panel li:nth-child(2)').click(function() {
$('#pom03par02WraperAbsolute').css('display','block');
$(this).css('background','#adff84');
$('.par02table').css('background','#adff84');
return false;
});
$('#right-panel li:nth-child(3)').click(function() {
$('#pom03par03WraperAbsolute').css('display','block');
$(this).css('background','#adff84');
$('.par03table').css('background','#adff84');
return false;
});
$('#right-panel li:nth-child(4)').click(function() {
$('#pom03par04WraperAbsolute').css('display','block');
$(this).css('background','#adff84');
$('.par04table').css('background','#adff84');
return false;
});
You can try this one using jQuery each: