Sunday, 8 September 2013

Jquery Multi Tabs Script Not Working

Jquery Multi Tabs Script Not Working

This is the pen I'm working on but the the content of each tab do not
update please check the Jquery I've coded below.
$('.content-canvas').find('div').hide();
$('.content-canvas div:first-child').show();
$('.tab-button span:first-child').addClass('active');
$('.tab-button').find('span').click(function(){
$('.tab-button').find('span').removeClass('active');
$(this).addClass('active');
var currentclass=$('.active').attr('class');
$('.content-canvas').find('div').each(function(){
if($(this).attr('class')==currentclass)
{
$('.content-canvas').find('div').hide();
$(this).show();
}
else
{
$(this).hide();
}
});
});

No comments:

Post a Comment