What i want is hide all content first, then click one tab, the corresponding content shows (the tab becomes \'active\'), where click it again it will disappear. some of the
$(document).ready(function(){
$('#nav div').hide();
$('#nav div:first').show();
$('a').click(function(){
var currentTab = '#'+$(this).text().toLowerCase();
if($(currentTab).is(':visible')){
$('#nav div').hide();
$(currentTab).hide();
}else{
$('#nav div').hide();
$(currentTab).show();
}
}
);
});
Please try above code.. I change href value to just "#" then some change in jquery. Please ask in comment if you have any doubt.. click here to test