I have the following code: fiddle
Which works great in websites I create my self and with no JS the tabs act as jump links to the relevant sections. When placed in
I am guessing your website is having problems with href, i presume that when user clicks a href, website automatically eradicating itself.
Here is new solution's jsFiddle.
I have a new solution for you:
updated jQuery:
$('#tabs li a').click(function(){
var t = $(this).attr('id');
if($(this).hasClass('inactive')){ //this is the start of our condition
$('#tabs li a').addClass('inactive');
$(this).removeClass('inactive');
$('.container').hide();
$('#'+ t + 'C').fadeIn('slow');
}
});
new html markup:
1Some content
2Some content
3Some content
4Some content