I’m trying to display my second li tag as default active tab.
My jquery code is
<script type="text/javascript">
$(document).ready(function(){
$('#newtabs div').hide();
$('#newtabs div:first').show();
$('#newtabs ul li:first').addClass('active');
$('#newtabs ul li a').click(function(){
$('#newtabs ul li').removeClass('active');
$(this).parent().addClass('active');
var currentTab = $(this).attr('href');
$('#newtabs div').hide();
$(currentTab).show();
return false;
});
});
</script>
Any suggestion to do this?
Try this: