agrega scrolldown automatico

This commit is contained in:
Germán Correa 2019-12-27 16:40:25 -03:00
parent 7af2573b37
commit 21a1d4aa26
2 changed files with 73 additions and 71 deletions

View File

@ -1,6 +1,14 @@
function routeMenu() {
var ruta = window.location.pathname.split(".")[0];
$("ul#menu li").removeClass("active");
ruta!=='/' &&
$([document.documentElement, document.body]).animate(
{
scrollTop: $("#content").offset().top
},
2000
);
switch (ruta) {
case "/":
$("li#home").addClass("active");
@ -33,41 +41,35 @@ $(document).ready(function(){
routeMenu();
//var margin = $(".container").css("margin-left");
//$("#menu").css("margin-left",margin);
var parallaxHeight = $(".parallax-mirror").height()
$("#header").height(parallaxHeight)
$('#contactform').submit(function(event){
var parallaxHeight = $(".parallax-mirror").height();
$("#header").height(parallaxHeight);
$("#contactform").submit(function(event) {
var fail = false;
$("#statusmsg").hide();
event.preventDefault();
if($('#g-recaptcha-response').val() == ""){
if ($("#g-recaptcha-response").val() == "") {
$("div.g-recaptcha").tooltip({
"title":'Marque "No soy un robot"',
"pacement":"right",
"trigger":"manual"
title: 'Marque "No soy un robot"',
pacement: "right",
trigger: "manual"
});
$("div.g-recaptcha").tooltip("show");
fail = true;
}
if (!fail) {
var post = $.post('contact', $(this).serialize());
var post = $.post("contact", $(this).serialize());
post.done(function(data) {
data = $.parseJSON(data);
if (data.success) {
showmsg(data.message, true);
}
else{
} else {
showmsg(data.message, false);
}
console.log(data)
console.log(data);
});
post.fail(function(error) {
console.log(error)
console.log(error);
});
}
});
});

View File

@ -2,7 +2,7 @@
{% block content %}
<div class="row">
<h1><strong>Programa</strong> </h1>
<h1 id="programa"><strong>Programa</strong> </h1>
<div class="col-xs-12">
<div class="alert alert-info">
<i class="glyphicon glyphicon-info-sign"></i> <strong>To be announced</strong><br/>