ureech, надо еще делегирование использовать.
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<div class="tabs-wrap">
<button class="tab" data-color="gray">Gray</button>
<button class="tab" data-color="red">Red</button>
<button class="tab" data-color="blue">Blue</button>
</div>
<div class="component" style="width:100%; height: 100px; margin-top: 10px;"></div>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script>
$(function(){
$('.tabs-wrap').on('click', '.tab', function() {
$('.component').css( 'background', $(this).data('color') );
})
});
</script>
</body>
</html>