I have the following JQuery, I want to display the default divarea1 visible when the user goes to the page, I am newbie to Jquery so any help would be great.
Best
SPS
<script type="text/javascript">
$(document).ready(function() {
$('.box').hide();
$('#dropdown').change(function() {
$('.box').hide();
$('#div' + $(this).val()).show();
});
});
</script>
<select id="dropdown" class="boxformwh" name="dropdown">
<option style="margin:20px;" value="area1"><b>DIV Area 1</b></option>
<option style="margin:20px;" value="area2"><b>DIV Area 2</b></option>
<option style="margin:20px;" value="area3"><b>DIV Area 3</b></option>
</select>
<div>
<div id="divarea1" class="box">DIV Area 1</div>
<div id="divarea2" class="box">DIV Area 2</div>
<div id="divarea3" class="box">DIV Area 3</div>
</div>
1 Answer