1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
$(document).ready(function(){
var testeur = 0;
$('.tabMenuPT > li:not(.blind, .lastblind)').removeClass('open').addClass('close');
$('.tabMenuPT > li:not(.blind, .lastblind)').click(function(){
if (($(this).hasClass("close")) && (testeur != 1)){
$('body').bind("mousewheel",function(){return false;});
$('.tabMenuPT > li:not(.blind, .lastblind)').removeClass('open').addClass('close');
$(this).removeClass('close').addClass('open');
$('.boxBodyPT div').stop().slideUp(300,'linear');
$('.boxBodyPT div:eq(' + $('.tabMenuPT > li').index(this) + ')').stop().slideDown(1500,'linear',function(){$('body').unbind("mousewheel");});
var testeur = 1;
}
else if (($(this).hasClass("close")) && (testeur != 0)){
$('body').bind("mousewheel",function(){return false;});
$('.tabMenuPT > li:not(.blind, .lastblind)').removeClass('open').addClass('close');
$(this).removeClass('close').addClass('open');
$('.boxBodyPT div').stop().slideUp(300,'linear');
$('.boxBodyPT div:eq(' + $('.tabMenuPT > li').index(this) + ')').stop().slideDown(1500,'linear',function(){$('body').unbind("mousewheel");});
var testeur = 1;
}
else if (($(this).hasClass("open")) && (testeur != 0)){
$('body').bind("mousewheel",function(){return false;});
$('.tabMenuPT > li:not(.blind, .lastblind)').removeClass('open').addClass('close');
$(this).removeClass('open').addClass('close');
$('.boxBodyPT div').stop().slideUp(300,'linear',function(){$('body').unbind("mousewheel");});
var testeur = 0;
}
});
}); |
Partager