Dropdown menu content changer
Change content on dropdown input box value change
by ajinkyax
HTML
<select id="selectMe">
<option value="option1">option1</option>
<option value="option2">option2</option>
<option value="option3">option3</option>
<option value="option4">option4</option>
</select>
<div id="option1" class="group">This is my content no.1</div>
<div id="option2" class="group">hahahah hihihi content chanegd 2</div>
<div id="option3" class="group">LOLITa hahahahha huhuhuhu content 3</div>
<div id="option4" class="group">This is last content 4</div>
JavaScript
$(document).ready(function () {
$('.group').hide();
$('#option1').show();
$('#selectMe').change(function () {
$('.group').hide();
$('#'+$(this).val()).show();
})
});