joker95,
<style>
.butt {height: 50px;
width: 100px }
.cras {background: red }
.jel {background: yellow}
.bel {background: white}
.kn {border:2px solid blue;
height: 50px;
width: 100px}
</style>
<div class="butt cras" id="red">Красный</div>
<div class="butt jel" id="ark">Желтый</div>
<div class="butt bel" id="well">Белый</div>
<div class="kn"></div>
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script>
$('.butt').on('click', function () {
var selclass = $(this).attr('class').replace("butt ", ""),
target = $('.kn');
target.removeClass();
target.addClass('kn ' + selclass);
});
</script>