2018-10-05 16:13:30 +00:00
|
|
|
function routeMenu(){
|
|
|
|
var ruta = window.location.pathname.split(".")[0];
|
|
|
|
$("ul#menu li").removeClass("active");
|
|
|
|
switch(ruta){
|
|
|
|
case "/":
|
|
|
|
$("li#home").addClass("active");
|
|
|
|
break;
|
2018-11-28 19:25:03 +00:00
|
|
|
case "/programa":
|
2018-10-05 16:13:30 +00:00
|
|
|
$("li#program").addClass("active");
|
|
|
|
break;
|
2019-11-06 00:20:53 +00:00
|
|
|
case "/committees":
|
2018-10-05 16:13:30 +00:00
|
|
|
$("li#committees").addClass("active");
|
2019-11-06 00:20:53 +00:00
|
|
|
break;
|
|
|
|
case "/conferencias":
|
|
|
|
$("li#conferencias").addClass("active");
|
2019-10-22 17:23:03 +00:00
|
|
|
break;
|
|
|
|
case "/sesiones":
|
|
|
|
$("li#sesiones").addClass("active");
|
2018-10-05 16:13:30 +00:00
|
|
|
break;
|
2018-11-28 19:25:03 +00:00
|
|
|
case "/registrarse":
|
2018-10-05 16:13:30 +00:00
|
|
|
$("li#registration").addClass("active");
|
|
|
|
break;
|
2018-11-28 19:25:03 +00:00
|
|
|
case "/participantes":
|
2018-10-05 16:13:30 +00:00
|
|
|
$("li#participants").addClass("active");
|
|
|
|
break;
|
2018-11-28 19:25:03 +00:00
|
|
|
case "/informacion-practica":
|
2018-10-05 16:13:30 +00:00
|
|
|
$("li#practicalinfo").addClass("active");
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$(document).ready(function(){
|
|
|
|
routeMenu();
|
2018-10-17 18:29:24 +00:00
|
|
|
//var margin = $(".container").css("margin-left");
|
2018-10-05 16:13:30 +00:00
|
|
|
//$("#menu").css("margin-left",margin);
|
2019-12-27 19:22:05 +00:00
|
|
|
var parallaxHeight = $(".parallax-mirror").height()
|
|
|
|
$("#header").height(parallaxHeight)
|
2018-10-05 16:13:30 +00:00
|
|
|
$('#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)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|