-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
122 lines (102 loc) · 2.2 KB
/
app.js
File metadata and controls
122 lines (102 loc) · 2.2 KB
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
$(document).ready(function(){
/**
* Enabled Console Log GF Javascript
* @type {Boolean}
*/
run_console = true;
/**
* Get Parameter From URl, You can change the parameter that you want
* @type {[string]}
*/
var get_page = _GET('p');
var get_id = _GET('id');
/**
* Set const of parameter
* @type {Array}
*/
const parameter = [
'home','profile','about','contact','user'
]
function setupQuery(q)
{
_animation("display"," Wait...");
/**
* Load Document if Equals
*/
switch(q)
{
case parameter[1]:
if (get_id)
{
_loadDoc("component/"+parameter[4],"display");
_setTitle("User | Garuda Javascript");
}
else
{
_loadDoc("component/"+parameter[1],"display");
_setTitle("Profile | Garuda Javascript");
}
break;
case parameter[2]:
_loadDoc("component/"+parameter[2],"display");
_setTitle("About | Garuda Javascript");
break;
case parameter[3]:
_loadDoc("component/"+parameter[3],"display");
_setTitle("Contact | Garuda Javascript");
break;
case parameter[4]:
_loadDoc("component/"+parameter[4],"display");
_setTitle("User | Garuda Javascript");
break;
default:
_loadDoc("component/"+parameter[0],"display");
_setTitle("Home | Garuda Javascript");
}
}
function setup()
{
setupQuery(get_page);
}
setup();
/**
* For input text search
* @return {[type]} [description]
*/
function search()
{
var u = _getValById("txt_search");
if (u === "")
{
_focus("txt_search");
}
else
{
var result = u.toLowerCase();
setupQuery(result);
_focus("txt_search");
}
}
/**
* For Button Search On Click
* @param {[type]} ){ search(); } [description]
* @return {[type]} [description]
*/
_onClick("btn_search",function(){
search();
});
_onClick("btn_modal",function(){
$("#my_modal").show();
});
_onClick("btn_close",function(){
$("#my_modal").hide();
});
/**
* For Keyboard Code
* @param {[type]} ){ search(); } [description]
* @return {[type]} [description]
*/
_keyCustom(function(){
$("#my_modal").show();
},_keyCode.insert);
});