This repository has been archived by the owner on Jan 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.js
135 lines (111 loc) · 4.15 KB
/
scripts.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
$(document).ready(function(){
// Add smooth scrolling to all links
$("a").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 800, function(){
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
});
(function() {
var burger = document.querySelector('.burger');
var nav = document.querySelector('#'+burger.dataset.target);
burger.addEventListener('click', function(){
burger.classList.toggle('is-active');
nav.classList.toggle('is-active');
});
})();
$(function() {
$('#WAButton').floatingWhatsApp({
phone: '56944092889',
// phone: '1231231231', //WhatsApp Business phone number International format-
//Get it with Toky at https://toky.co/en/features/whatsapp. 56 9 6231 8954
headerTitle: 'Talentuum - WhatsApp!', //Popup Title
popupMessage: 'Hola, como puedo ayudarte?', //Popup Message
showPopup: true, //Enables popup display
buttonImage: '<img src="https://rawcdn.githack.com/rafaelbotazini/floating-whatsapp/3d18b26d5c7d430a1ab0b664f8ca6b69014aed68/whatsapp.svg" />', //Button Image
//headerColor: 'crimson', //Custom header color
//backgroundColor: 'crimson', //Custom background button color
position: "right"
});
});
$(document).ready(function () {
$(window).scroll(function () {
if ($(window).scrollTop() >= 350) {
$(".navbar").addClass("solid-black");
} else {
$(".navbar").removeClass("solid-black");
}
});
});
function updateForm(show_this_class){
if( show_this_class == 'filter_candidate'){
$(".filter_candidate").addClass('is-hidden');
$(".filter_company").addClass('is-hidden');
$(".filter_candidate").removeClass('is-hidden');
}
if( show_this_class == 'filter_company'){
$(".filter_candidate").addClass('is-hidden');
$(".filter_company").addClass('is-hidden');
$(".filter_company").removeClass('is-hidden');
}
}
(function(){
emailjs.init("user_sA75mYspddybgzpGJml4p");
})();
function send_email(){
$("#response").hide();
$("#response").removeClass("is-success");
$("#response").removeClass("is-danger");
$("#response").addClass("is-danger");
if( $("#contact_name").val() == "" ){
$("#response").show();
$("#response").html("El nombre es obligatorio");
}else if ( $("#contact_email").val() == "" ){
$("#response").show();
$("#response").html("El email es obligatorio");
}else if ( $("#contact_message").val() == "" ){
$("#response").show();
$("#response").html("El mensaje es obligatorio");
}else{
$origin = "Empresa";
$extra = "Nombre empresa: "+$("#contact_empresa").val()
if( $("input[name='option']:checked").val() == 'talento'){
$origin = "Talento";
$extra = "Linkedin: "+$("#contact_linkedin").val()
}
var template_params = {
"reply_to": "[email protected]",
"from_name": "Talentuum Web",
"contact_name": $("#contact_name").val(),
"from_mail": $("#contact_email").val(),
"from_origin": $origin,
"extra_info": $extra,
"message_html": $("#contact_message").val()
}
var service_id = "default_service";
var template_id = "template_JJ0hOd2n";
emailjs.send(service_id, template_id, template_params);
$("#response").removeClass("is-danger");
$("#response").addClass("is-success");
$("#response").html("Mensaje enviado exitosamente");
$("#response").show()
$("#contact_name").val("")
$("#contact_email").val("")
$("#contact_linkedin").val("")
$("#contact_empresa").val("")
$("#contact_message").val("")
$("#button_send").hide();
}
}