以下に示すように、ドロップダウン メニューと 2 つの div を含む Web ページがあります。
<html>
<head>
<title>Show/Hide a div section based on selection</title>
</head>
<body>
<select id='sel'>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
</select>
<div id="firstdiv">
<label><input type="checkbox" id='1' />A</label>
<label><input type="checkbox" id='2' />B</label>
<label><input type="checkbox" id='3' />C</label>
</div>
<div id="seconddiv">
<label><input type="checkbox" id='4' />D</label>
<label><input type="checkbox" id='5' />E</label>
<label><input type="checkbox" id='6' />F</label>
</div>
</body>
</html>
javascriptまたはjQueryを使用した選択に基づいて、上記の2つのdivの表示を切り替えるにはどうすればよいですか? つまり、オプション1を選択すると、最初のdivが表示され、後で非表示になり、その逆になります。