function vaaladiv(id,speed){$('html,body').animate({scrollTop: $("#"+id).offset().top }, speed);} function voirdiapo(id,table){ $("#popupsite").show().load('Diapo.php?id='+id+'&table='+table) ; vaaladiv('popupsite'); } $(document).ready(function(){ $('#bthaut').hide(); $(window).scroll(function() { posScroll = $(document).scrollTop(); if(posScroll >=100) {$('#bthaut').slideDown(450);} else {$('#bthaut').slideUp(450);}; }); }); function mes(id,html,temps,son){ $("#mesale").hide(); $("#mesrep").hide(); $("#mesrem").hide(); if(!$("#mes"+id).is(':visible')) { $("#mes"+id).fadeIn(100).css({"display":"inline-block"}).html(html).delay(temps).fadeOut(100); sound('../mp3/'+son); } } function ferme(id) {$(id).fadeOut(200);} function affi(id) {$(id).fadeIn(200);} function retire(id) {$(id).remove();} function vide(id) {$(id).html("");} function erreur(id){ $("#"+id).focus().val("").css("backgroundColor","red").effect("pulsate",1000); anim(id,'background-color','white',1000,'swing'); } function anim(id,prop,val,speed,metod){ var obj = {}; obj[prop] = val; $("#"+id).animate(obj,speed,metod); } function setcss(id,prop,val){ var obj = {}; obj[prop] = val; $("#"+id).css(obj); } function isEmail(myVar){ var regEmail = new RegExp('^[0-9a-z._-]+@{1}[0-9a-z.-]{2,}[.]{1}[a-z]{2,5}$','i'); return regEmail.test(myVar); } function verifemail(){ email=$("#email").val().trim(); if(email=='') { erreur('email'); mes("ale","Veuillez saisir votre email !",2000,"SaisirEmail"); return; } if(!isEmail(email)) { erreur('email'); mes("ale","Cet email est invalide !",2000,"EmailInvalid"); return; } return true; } function ajusarea(id){ arg=$("#"+id).val(); var nbr_line = 1; var nbr_char_line = 0; var largeur=$("#"+id).width(); var nbr_char_on_line = largeur/8; for(var i = 0;inbr_char_on_line){ nbr_line++; nbr_char_line = 1; } } } $("#"+id).height(nbr_line*20); } function voirphoto(url){ $("#voirphoto").show(); $("#voirphotoimg").attr("src",url); }
X
HD
catégorie : Evénementiel