forked from ipectrinity/pseudonerds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
65 lines (53 loc) · 1.61 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
61
62
63
64
65
$(function() {
$('#login-show').click(function() {
$('#login-modal').fadeIn();
});
$('.signup-show').click(function() {
$('#signup-modal').fadeIn();
});
$('.close-modal').click(function() {
$('#login-modal').fadeOut();
$('#signup-modal').fadeOut();
});
$('.lesson-hover').hover(
function() {
$(this).find('.text-contents').addClass('text-active');
},
function() {
$(this).find('.text-contents').removeClass('text-active');
}
);
$('.faq-list-item').click(function() {
var $answer = $(this).find('.answer');
if($answer.hasClass('open')) {
$answer.slideUp();
$answer.slideUp();
// Find the <span> elements inside, then rewrite the content using the text() method
$(this).find('span').text('+');
} else {
$answer.addClass('open');
// Use the slideDown() method to show $answer
$answer.slideDown();
// Find the <span> elements inside, then rewrite the content using the text() method
$(this).find('span').text('-');
}
});
function myFunction(rate) {
var rates = document.getElementById("rate").value;
var rate_value;
if(rates =='1'){
rate_value = document.getElementById('r1').value;
}else if(rates =='2'){
rate_value = document.getElementById('r2').value;
}else if(rates =='3'){
rate_value = document.getElementById('r3').value;
}
else if(rates =='4'){
rate_value = document.getElementById('r4').value;
}
else if(rates =='5'){
rate_value = document.getElementById('r5').value;
}
document.getElementById('results').innerHTML = rate_value;
}
});