Learn how to use jQuery at the Blog

Design In Social « visit

  • Added 6 months ago
  • 84 Lines of Code shown
  • 2 Links of Interest
http://designinsocial.com
This is my Source Code and I don't want to show it here
View Source Code only (as overlay)
// That code snippet belongs to Design In Social - http://designinsocial.com

$(function(){
	
		// cerrar validacion
		function cierraAlClick(){
			$(".formError").fadeTo("fast",0,function(){
				$(".formError").remove()
			});
		};
		$('#sobre').click(function(){
			$('#content').animate({marginTop:0});
		});
		$('#postula').click(function(){
			$('#content').animate({marginTop:-510});
		});
		$('#proyectos').click(function(){
			$('#content').animate({marginTop:-910});
		});
		$('#header a').click(function(){
			cierraAlClick();
		});
		
		// fancybox
		$("a.fancy").fancybox().click(function(){
			cierraAlClick();
		});;
		
		// footer
		$('#footer').hover(
			function(){
				$(this).animate({bottom:-40},{queue: false, duration: 300});
			},
			function(){
				$(this).animate({bottom:-150},{queue: false, duration: 100});
			}
		);
		
		$("[class^=validate]").validationEngine({
			success: function(){
					$('#contactForm').hide();
					$('.sending').show(); 
					$.get('inc/mail.php',
						{
							nombre:$('#nombre').val(),
							empresa:$('#empresa').val(),
							rubro:$('#rubro').val(),
							descripcion:$('#descripcion').val(),
							ciudad:$('#ciudad').val(),
							pais:$('#pais').val(),
							email:$('#email').val(),
							telefono:$('#telefono').val()
						},
						function(data){
							$('.sending').hide();
							$('#contactForm').show().empty().append("<div class='exito'><h2>&iexcl;Gracias!</h2><p>Revisaremos tus datos y te contactaremos lo antes posible.</p></div>");  
						}
					);				
					return false;
			}
		});
/*
		// submit formulario
		$('#contactForm').submit(function(){
			$('#contactForm').hide();
			$('.sending').show(); 
			$.get('inc/mail.php',
				{
					nombre:$('#nombre').val(),
					empresa:$('#empresa').val(),
					rubro:$('#rubro').val(),
					descripcion:$('#descripcion').val(),
					ciudad:$('#ciudad').val(),
					pais:$('#pais').val(),
					email:$('#email').val(),
					telefono:$('#telefono').val()
				},
				function(data){
					$('.sending').hide();
					$('#contactForm').show().empty().append("<div class='exito'><h2>&iexcl;Gracias!</h2><p>Revisaremos tus datos y te contactaremos lo antes posible.</p></div>");  
				}
			);				
			return false;		
		});
*/
});