-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
60 lines (45 loc) · 1.34 KB
/
script.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
function reveal(elementid) {
document.getElementById(elementid).style.display = "block";
}
function SubForm() {
$.ajax({
url:'https://api.apispreadsheets.com/data/F3cMXO3p5zzNM2sN/',
type:'post',
data:$("#myForm").serializeArray(),
success: function(){
document.getElementById("success").style.display = "block"
},
error: function(){
document.getElementById("error").style.display = "block"
}
});
}
$(document).ready(function() {
$('#inputWrapper').on('keyup', '#message', function() {
if($(this).val() == '') {
$('div#final-button').text('Non ho niente da dire');
$('div#final-button').removeClass('special');
$('div#final-button').addClass('continue');
$('div#yousure').text('Non vuoi scrivere neanche una parola?');
} else {
$('div#final-button').text('Invia il messaggio');
$('div#final-button').removeClass('continue');
$('div#final-button').addClass('special');
$('div#yousure').text('💌');
}
});
});
function waiting() {
document.getElementById('final-button').innerHTML = 'invio in corso...';
}
function credits() {
window.location.href = "credits.html"
}
function changetheme() {
var x = document.getElementById("background");
if (x.className === "light") {
x.className = "dark";
} else {
x.className = "light";
}
}