80 lines
2.1 KiB
JavaScript
80 lines
2.1 KiB
JavaScript
function routeMenu() {
|
|
var ruta = window.location.pathname.split(".")[0];
|
|
$("ul#menu li").removeClass("active");
|
|
|
|
(ruta!=='/' && ruta!=='/descripcion') &&
|
|
$([document.documentElement, document.body]).animate(
|
|
{
|
|
scrollTop: $("#content").offset().top
|
|
},
|
|
2000
|
|
);
|
|
switch (ruta) {
|
|
case "/":
|
|
$("li#home").addClass("active");
|
|
$("#avisomodal").modal("show");
|
|
break;
|
|
case "/programa":
|
|
$("li#program").addClass("active");
|
|
break;
|
|
case "/descripcion":
|
|
$("li#descripcion").addClass("active");
|
|
break;
|
|
case "/comites":
|
|
$("li#comites").addClass("active");
|
|
break;
|
|
case "/conferencias":
|
|
$("li#conferencias").addClass("active");
|
|
break;
|
|
case "/sesiones":
|
|
$("li#sesiones").addClass("active");
|
|
break;
|
|
case "/registrarse":
|
|
$("li#registration").addClass("active");
|
|
break;
|
|
case "/participantes":
|
|
$("li#participants").addClass("active");
|
|
break;
|
|
case "/informacion-practica":
|
|
$("li#practicalinfo").addClass("active");
|
|
break;
|
|
default:
|
|
}
|
|
}
|
|
$(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 fail = false;
|
|
$("#statusmsg").hide();
|
|
event.preventDefault();
|
|
if ($("#g-recaptcha-response").val() == "") {
|
|
$("div.g-recaptcha").tooltip({
|
|
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());
|
|
post.done(function(data) {
|
|
data = $.parseJSON(data);
|
|
if (data.success) {
|
|
showmsg(data.message, true);
|
|
} else {
|
|
showmsg(data.message, false);
|
|
}
|
|
console.log(data);
|
|
});
|
|
post.fail(function(error) {
|
|
console.log(error);
|
|
});
|
|
}
|
|
});*/
|
|
});
|