<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<style>
#trigger {
width: 100px;
height: 100px;
background: gray;
}
#trigger2 {
width: 100px;
height: 100px;
background: black;
display: block;
}
</style>
<body>
<div id="trigger"></div>
<div id="trigger2"></div>
<script>
switch ('x') {
case 'x':
document.getElementById('trigger').style.display = 'none';
break;
default:
alert('yt')
};
</script>
</body>
</html>