Hi,
I am stuck up with this function to make simple Tabs. It works absolutely fine 
only with the first two tabs. Can someone please observe the code and reply the 
problem.

Below "d" stands for the header(div) in which the links are, "e" for the 
targeted content(div), and "f" for the sequence number.

<script>
function TabTasTic(d,e,f){
$('#'+ d +' a').css({background: '#ffffff'});
$('#'+ e +' div').hide();
$('#'+ e +' div').eq(f).show();
$('#'+ d +' a').eq(f).css({background: '#000000'});
}
</script>
<div class="header" id="header">
<a href="javascript:TabTasTic('header','content','0');">Tab1</a>
<a href="javascript:TabTasTic('header','content','1');">Tab2</a>
<a href="javascript:TabTasTic('header','content','2');">Tab3</a>
<a href="javascript:TabTasTic('header','content','3');">Tab2</a>
</div>
<div class="content" id="content">
<div>T1</div>
<div>T2</div>
<div>T3</div>
<div>T4</div>
</div>

Reply via email to