agrega scrolldown automatico
This commit is contained in:
		
							parent
							
								
									7af2573b37
								
							
						
					
					
						commit
						21a1d4aa26
					
				
							
								
								
									
										142
									
								
								public/js/app.js
									
									
									
									
									
								
							
							
						
						
									
										142
									
								
								public/js/app.js
									
									
									
									
									
								
							| @ -1,73 +1,75 @@ | |||||||
| function routeMenu(){ | function routeMenu() { | ||||||
| 	var ruta = window.location.pathname.split(".")[0]; |   var ruta = window.location.pathname.split(".")[0]; | ||||||
| 	$("ul#menu li").removeClass("active"); |   $("ul#menu li").removeClass("active"); | ||||||
| 	switch(ruta){ |    | ||||||
| 		case "/": |   ruta!=='/' && | ||||||
| 			$("li#home").addClass("active"); |   $([document.documentElement, document.body]).animate( | ||||||
| 			break; |     { | ||||||
| 		case "/programa": |       scrollTop: $("#content").offset().top | ||||||
| 			$("li#program").addClass("active"); |     }, | ||||||
| 			break; |     2000 | ||||||
| 		case "/committees": |   ); | ||||||
| 			$("li#committees").addClass("active"); |   switch (ruta) { | ||||||
| 			break; |     case "/": | ||||||
| 		case "/conferencias": |       $("li#home").addClass("active"); | ||||||
| 			$("li#conferencias").addClass("active"); |       break; | ||||||
| 			break; |     case "/programa": | ||||||
| 		case "/sesiones": |       $("li#program").addClass("active"); | ||||||
| 			$("li#sesiones").addClass("active"); |       break; | ||||||
| 			break; |     case "/committees": | ||||||
| 		case "/registrarse": |       $("li#committees").addClass("active"); | ||||||
| 			$("li#registration").addClass("active"); |       break; | ||||||
| 			break; |     case "/conferencias": | ||||||
| 		case "/participantes": |       $("li#conferencias").addClass("active"); | ||||||
| 			$("li#participants").addClass("active"); |       break; | ||||||
| 			break; |     case "/sesiones": | ||||||
| 		case "/informacion-practica": |       $("li#sesiones").addClass("active"); | ||||||
| 			$("li#practicalinfo").addClass("active"); |       break; | ||||||
| 			break; |     case "/registrarse": | ||||||
| 		default: |       $("li#registration").addClass("active"); | ||||||
| 	} |       break; | ||||||
|  |     case "/participantes": | ||||||
|  |       $("li#participants").addClass("active"); | ||||||
|  |       break; | ||||||
|  |     case "/informacion-practica": | ||||||
|  |       $("li#practicalinfo").addClass("active"); | ||||||
|  |       break; | ||||||
|  |     default: | ||||||
|  |   } | ||||||
| } | } | ||||||
| $(document).ready(function(){ | $(document).ready(function() { | ||||||
| 	routeMenu(); |   routeMenu(); | ||||||
| 	//var margin = $(".container").css("margin-left");
 |   //var margin = $(".container").css("margin-left");
 | ||||||
| 	//$("#menu").css("margin-left",margin);
 |   //$("#menu").css("margin-left",margin);
 | ||||||
| 	var parallaxHeight = $(".parallax-mirror").height() |   var parallaxHeight = $(".parallax-mirror").height(); | ||||||
| 	$("#header").height(parallaxHeight) |   $("#header").height(parallaxHeight); | ||||||
| 	$('#contactform').submit(function(event){ |   $("#contactform").submit(function(event) { | ||||||
|         var fail=false; |     var fail = false; | ||||||
| 		$("#statusmsg").hide(); |     $("#statusmsg").hide(); | ||||||
| 		event.preventDefault(); |     event.preventDefault(); | ||||||
| 		if($('#g-recaptcha-response').val() == ""){ |     if ($("#g-recaptcha-response").val() == "") { | ||||||
|             	$("div.g-recaptcha").tooltip({ |       $("div.g-recaptcha").tooltip({ | ||||||
| 				"title":'Marque "No soy un robot"', |         title: 'Marque "No soy un robot"', | ||||||
| 				"pacement":"right", |         pacement: "right", | ||||||
| 				"trigger":"manual" |         trigger: "manual" | ||||||
| 			}); |       }); | ||||||
| 			$("div.g-recaptcha").tooltip("show"); |       $("div.g-recaptcha").tooltip("show"); | ||||||
| 			fail=true; |       fail = true; | ||||||
|  |     } | ||||||
|  |     if (!fail) { | ||||||
|  |       var post = $.post("contact", $(this).serialize()); | ||||||
|  |       post.done(function(data) { | ||||||
|  |         data = $.parseJSON(data); | ||||||
|  |         if (data.success) { | ||||||
|  |           showmsg(data.message, true); | ||||||
|  |         } else { | ||||||
|  |           showmsg(data.message, false); | ||||||
|         } |         } | ||||||
|         if(!fail){ |         console.log(data); | ||||||
|             var post = $.post('contact', $(this).serialize()); |       }); | ||||||
|             post.done(function(data){ |       post.fail(function(error) { | ||||||
|                 data = $.parseJSON(data); |         console.log(error); | ||||||
|                 if(data.success){ |       }); | ||||||
|                     showmsg(data.message,true); |     } | ||||||
|                 } |   }); | ||||||
|                 else{ |  | ||||||
|                     showmsg(data.message,false); |  | ||||||
| 
 |  | ||||||
|                 } |  | ||||||
|                 console.log(data) |  | ||||||
| 
 |  | ||||||
|             }); |  | ||||||
|             post.fail(function(error){ |  | ||||||
|                 console.log(error) |  | ||||||
|             }); |  | ||||||
|         } |  | ||||||
| 	}); |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| }); | }); | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
| 
 | 
 | ||||||
| {% block content %} | {% block content %} | ||||||
|   <div class="row"> |   <div class="row"> | ||||||
|     <h1><strong>Programa</strong> </h1> |     <h1 id="programa"><strong>Programa</strong> </h1> | ||||||
|     <div class="col-xs-12"> |     <div class="col-xs-12"> | ||||||
|         <div class="alert alert-info"> |         <div class="alert alert-info"> | ||||||
|             <i class="glyphicon glyphicon-info-sign"></i> <strong>To be announced</strong><br/>       |             <i class="glyphicon glyphicon-info-sign"></i> <strong>To be announced</strong><br/>       | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Germán Correa
						Germán Correa