Line 1: | Line 1: | ||
jQuery(document).ready(function($){ | jQuery(document).ready(function($){ | ||
− | + | $('.week-header').on('click', function(){ | |
var values = this.id.split('-'); | var values = this.id.split('-'); | ||
var target = '#' + values[0] + '-week-' + values[2] + '-content'; | var target = '#' + values[0] + '-week-' + values[2] + '-content'; | ||
− | + | $(target).slideToggle(); | |
+ | }); | ||
+ | |||
+ | $('.team').on('click', function(){ | ||
+ | var active = "team-active"; | ||
+ | if(active.test(this.className)) { return ;} else { | ||
+ | var team = this.id.split('-')[1]; | ||
+ | if(team == 'pcage') { | ||
+ | $('#pcage-team-journal').fadeIn(); | ||
+ | $('#cdi-team-journal').fadeOut(); | ||
+ | $('#team-pcage').addClass('team-active'); | ||
+ | $('#team-cdi').removeClass('team-active'); | ||
+ | } else if (team == 'cdi') { | ||
+ | $('#pcage-team-journal').fadeOut(); | ||
+ | $('#cdi-team-journal').fadeIn(); | ||
+ | $('#team-pcage').removeClass('team-active'); | ||
+ | $('#team-cdi').addClass('team-active') | ||
+ | } | ||
+ | } | ||
}); | }); | ||
}); | }); |
Revision as of 23:33, 26 July 2016
jQuery(document).ready(function($){
$('.week-header').on('click', function(){ var values = this.id.split('-'); var target = '#' + values[0] + '-week-' + values[2] + '-content'; $(target).slideToggle(); });
$('.team').on('click', function(){ var active = "team-active"; if(active.test(this.className)) { return ;} else { var team = this.id.split('-')[1];
if(team == 'pcage') { $('#pcage-team-journal').fadeIn(); $('#cdi-team-journal').fadeOut(); $('#team-pcage').addClass('team-active'); $('#team-cdi').removeClass('team-active'); } else if (team == 'cdi') { $('#pcage-team-journal').fadeOut(); $('#cdi-team-journal').fadeIn(); $('#team-pcage').removeClass('team-active'); $('#team-cdi').addClass('team-active') }
} });
});