Julia1991,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
.red{
background-color: #FF0000;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
jQuery(function() {
var divs = jQuery(".input_block").each(function(i, div) {
div = $(div).on("change", '[type="radio"]', function() {
divs.removeClass("red");
div.addClass("red");
});
});
});
</script>
</head>
<body>
<div class="input_block">
<input name="floor" type="radio" value="1-этаж" >
<span>1</span>
</div>
<div class="input_block">
<input name="floor" type="radio" value="2-этаж" >
<span>2</span>
</div>
</body>
</html>