-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.js
103 lines (84 loc) · 3.88 KB
/
popup.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
/*
╔════╦════╗ ╔╗ ╔══╗ ╔══════
║ ║ ║ ╔╝╚╗ ║ ╚═╗ ║
║ ║ ║ ║ ║ ║ ║ ╠══════
║ ║ ║ ╔╝ ╚╗ ║ ║ ║
║ ║ ║ ╠══════╣ ║ ╔═╝ ║
║ ║ ║ ╔╝ ╚╗ ╚══╝ ╚══════
╔═════╗ ║ ║
║ ║ ╚╗ ╔╝
║═════╣ ╚╦╝
║ ║ ║
║ ║ ║
╚═════╝ ║
║ ╔╝ ╔╗ ╖ ╔═══╗ ╚╗ ║ ╔╝
║╔╝ ║╚╗ ║ ║ ║ ║ ║ ║
╠╝ ║ ║ ║ ║ ║ ║ ║ ║
╠╗ ║ ╚╗║ ║ ║ ╚╗ ║ ╔╝
║╚╗ ║ ║║ ║ ║ ║ ║ ║
║ ╚╗ ╙ ╚╝ ╚═══╝ ╚═╩═╝
╔══ ╔══ ╔══╗ ╔═╗ ══╦══ ╔══ ║ ║ ╔══ ╔══╗
║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║
╚═╗ ║ ╠╦═╝ ╠═╣ ║ ║ ╠════╣ ╠══ ╠╦═╝
║ ║ ║╚═╗ ║ ║ ║ ║ ║ ║ ║ ║╚═╗
══╝ ╚══ ║ ╚ ║ ║ ║ ╚══ ║ ║ ╚══ ║ ╚
╔══ ║ ║ ╔══ ║ ║ ═╦═ ╔══╗ ╔═══
║ ║ ║ ║ ║ ║ ║ ║ ║ ║
║ ╚╦╝ ╚═╗ ╠════╣ ║ ╠╦═╝ ║
║ ║ ║ ║ ║ ║ ║╚═╗ ║
╚══ ║ ══╝ ║ ║ ═╩═ ║ ╚ ╚═══
資研社保佑 程式bug退散
*/
function show_form() {
$("#sign-up.form").fadeIn('fast');
}
function hide_form() {
$("#sign-up.form").fadeOut('fast');
}
function show_map() {
$("#map.map").fadeIn('fast');
}
function hide_map() {
$("#map.map").fadeOut('fast');
}
$(document).ready(function () {
$("#map.map:not(.map-content)").click(function(e) {
var container = $(".map-content");
if (!container.is(e.target) && container.has(e.target).length === 0) {
$("#map.map").fadeOut('fast');
}
});
$("#sign-up.form").click(function() {
hide_form();
});
$(".s_button").click(function() {
$(".selected").attr("class","s_button");
$(this).attr("class","s_button selected");
$(".show").slideUp(500,function() {
$(this).attr("class","plate show");
});
var id = $(this).attr("id");
switch(id){
case "bus_r":
$("#bus_r_plate").slideDown(500,function() {
$(this).attr("class","plate show");
window.location.replace("#select_route");
});
break;
case "train_n":
$("#train_n_plate").slideDown(500,function() {
$(this).attr("class","plate show");
window.location.replace("#select_route");
});
break;
case "train_s":
$("#train_s_plate").slideDown(500,function() {
$(this).attr("class","plate show");
window.location.replace("#select_route");
});
break;
default:
window.location.replace("#route");
}
});
});