I have 3 links each opening his own div element, the problem is that when I refresh my page each 3 are visible, and at load I want the first to be shown and then toggle with show and hide functions in jquery between each other
HTML
<a class="button" id="showdiv2">Div 2</a>
<a class="button" id="showdiv3">Div 3</a>
<a class="button" id="showdiv4">Div 4</a>
<div id="div2">2</div>
<div id="div3">3</div>
<div id="div4">4</div>
JS
$('#showdiv2').click(function(){
$('div[id^=div]').hide();
$('#div2').show();
});
$('#showdiv3').click(function(){
$('div[id^=div]').hide();
$('#div3').show();
});
$('#showdiv4').click(function(){
$('div[id^=div]').hide();
$('#div4').show();
});