forked from divyanshusahu/Navita
-
Notifications
You must be signed in to change notification settings - Fork 1
/
script.js
88 lines (85 loc) · 2.88 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// Universal script for login
$(document).ready(function(){
$('#login').click(function(){
document.getElementById('logindiv').style.display="block";
});
$('.close').click(function(){
document.getElementById('logindiv').style.display="none";
});
$('.cancelbtn').click(function(){
document.getElementById('logindiv').style.display="none";
});
});
var modal = document.getElementById('logindiv'); // close login form on outside click
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
// login script ends
// Index page top review change script
$(document).ready(function(){
$('#review1').click(function(){
document.getElementById('user1').style.display="block";
document.getElementById('user2').style.display="none";
document.getElementById('user3').style.display="none";
$('#review1').addClass("active");
$('#review2').removeClass("active");
$('#review3').removeClass("active");
});
$('#review2').click(function(){
document.getElementById('user1').style.display="none";
document.getElementById('user2').style.display="block";
document.getElementById('user3').style.display="none";
$('#review1').removeClass("active");
$('#review2').addClass("active");
$('#review3').removeClass("active");
});
$('#review3').click(function(){
document.getElementById('user1').style.display="none";
document.getElementById('user2').style.display="none";
document.getElementById('user3').style.display="block";
$('#review1').removeClass("active");
$('#review2').removeClass("active");
$('#review3').addClass("active");
});
});
// script ends
// Index page review location change
$(document).ready(function(){
$('#location-1').click(function(){
$('#location-1').addClass("active");
$('#location-2').removeClass("active");
$('#location-3').removeClass("active");
$('#location-4').removeClass("active");
$('#location-5').removeClass("active");
});
$('#location-2').click(function(){
$('#location-1').removeClass("active");
$('#location-2').addClass("active");
$('#location-3').removeClass("active");
$('#location-4').removeClass("active");
$('#location-5').removeClass("active");
});
$('#location-3').click(function(){
$('#location-1').removeClass("active");
$('#location-2').removeClass("active");
$('#location-3').addClass("active");
$('#location-4').removeClass("active");
$('#location-5').removeClass("active");
});
$('#location-4').click(function(){
$('#location-1').removeClass("active");
$('#location-2').removeClass("active");
$('#location-3').removeClass("active");
$('#location-4').addClass("active");
$('#location-5').removeClass("active");
});
$('#location-5').click(function(){
$('#location-1').removeClass("active");
$('#location-2').removeClass("active");
$('#location-3').removeClass("active");
$('#location-4').removeClass("active");
$('#location-5').addClass("active");
});
});