add tabs reload ajax
Posted
by alkitbi
on Stack Overflow
See other posts from Stack Overflow
or by alkitbi
Published on 2010-06-05T11:06:14Z
Indexed on
2010/06/05
11:12 UTC
Read the original article
Hit count: 274
I want to add to this simple file ... When you click on a tab updated contents of the page or reload
$(function(){
$('#tabs #nav li a').click(function(){
var currentNum = $(this).attr('id').slice(-1);
$('#tabs #nav li a').removeClass('current');
$(this).addClass('current');
$('#tabs #content .tab-slide').hide();
$('#tabs #content #slide-'+currentNum+'.tab-slide').show();
});
$('#tabsSlide #nav li a').click(function(){
var currentNum = $(this).attr('id').slice(-1);
$('#tabsSlide #nav li a').removeClass('current');
$(this).addClass('current');
$('#tabsSlide #content .tab-slide').slideUp(300);
$('#tabsSlide #content #slide-'+currentNum+'.tab-slide').slideDown(300);
});
});
© Stack Overflow or respective owner