$().ready(function() { $('#mon_compte #a_login').click(function(){ if ($('#div_login_content').css('display') == 'block') { //$('#div_login_content').css('display','none'); $('#div_login_content').animate({ width: 'hide', height: 'hide', }, 500, 'linear'); } else { $('#div_login_content').show('fast'); $.post("/script/script_ajax_mdl.php", {mdl_code:"MDL_USER_LOGIN_COL"}, function(data){ if(data.length >0) { data = data+"Fermer"; //$('#div_login_content').css('display','block'); $('#div_login_content').html(data); $('#div_login_content').animate({ width: 'show', height: 'show', }, 500, 'linear'); } }); } return false; }); if(window.innerWidth > 640) { var hd = $("#droite").height(); var hc = $("#centre").height(); if (hc > hd) { $("#droite").css("height",(hc+120)+'px'); } var offset = 220; window.onscroll = function() { if (window.pageYOffset >= offset){ $('#menu1').addClass("topfixed centered"); } else { $('#menu1').removeClass("topfixed centered"); } } } }); function jsToggle(idtf, selectedEffect){ //get effect type from //most effect types need no options passed by default var options = {}; //check if it's scale, transfer, or size - they need options explicitly set if(selectedEffect == 'scale'){ options = {percent: 0}; } else if(selectedEffect == 'size'){ options = { to: {width: 200,height: 60} }; } //run the effect $("#"+idtf).toggle(selectedEffect,options,1000); return false; };