-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.html
339 lines (325 loc) · 8.34 KB
/
README.html
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# easy.js
easy js has many prebuit funtions and elements to making coding with javascript better and faster to write
<style>
html {
scroll-behavior: smooth
}
h1 {
text-transform: capitalize;
}
</style>
<nav>
<h1>Documentation Menu</h1>
<a href="#gettingelements">easy.js selectors</a>
<br>
<a href="#random">random numbers</a>
<br>
<a href="#platfrom">platfrom</a>
<br>
<a href="#model">model</a>
<br>
<a href="#ls">localstorage</a>
<br>
<a href="#show-hide">show/hide</a>
<br>
<a href="#code-tag"><code-tag></a>
<br>
<a href="#comment-tag"><comment-tag></a>
<br>
<a href="#link">link</a>
<br>
<a href="#link">notify</a>
<br>
found a problem fix on <a href="https://github.com/s0net/easy.js" target="_blank" class="github">github</a>
</nav>
<main>
<br>
<section class="main-section" id="gettingelements">
<h1>
getting elements using easy.js
</h1>
<p>
<b>
using easy.js you can get elements by DOM much easier
easy.js give 12 options alternatives for DOM
</b>
<h1>
grab()
</h1>
<p>
Use grab("#id") to get an element by id
<br>
Use grab(".id") to get an elements by class name
</p>
<h1>
intext()
</h1>
<p>
use intext(".classname"/"#id") to get the inner text of a element with a id/classname
</p>
<h1>
inhtml()
</h1>
<p>
use inhtml(".classname"/"#id") to get the inner html of a element with a id/classname
</p>
<h1>
src()
</h1>
<p>
use src(".classname"/"#id") to get the src arrtibute's value of a element with a id/classname
</p>
<h1>
val()
</h1>
<p>
use val(".classname"/"#id") to get the value arrtibute's value of a element with a id/classname
</p>
</section>
<hr>
<section class="main-section" id="random">
<h1>
random
</h1>
<p>
random(till the number you want)
</p>
<p>Let us now look a example program : <br>
</p>
this is used to get a random number till the number you want
<code>
random(100)
<span class="code">//try this in console</span>
</code>
</section>
<hr>
<section class="main-section" id="random-pic">
<h1>
random picture
</h1>
<p>
is used to get a random picture this will retrun a url
</p>
<p>Let us now look a example program : <br>
</p>
<code>
random_img()
<span class="code">//try this in console</span>
</code>
</section>
<hr>
<section class="main-section" id="platfrom">
<h1>
platfrom
</h1>
<p>
this is a var to get the users platfrom like win32
</p>
<p>Let us now look a example program : <br>
</p>
<code>
console.log(platfrom)
<span class="code">//try this in console</span>
</code>
</section>
<hr>
<section class="main-section" id="model">
<h1>
model
</h1>
<p>
use this to make a model box in html
</p>
<p>Let us us see all the options with the help of a code example : <br>
</p>
<code>
model("title", "text to put inside", "width in css like 100vh", "heigth again in css like 600px", "close button text", "backgound color in css", "text color in css you can use hex rgb or css colors")
<span class="code">//try this in console</span>
</code>
<h1>
title
</h1>
<p>
use this as the title property if there is no title use null
</p>
<h1>
text
</h1>
<p>
use this for the inside text you can use html in this the overflowing text will not appeare so use a br tag or
a change the with
</p>
<h1>
width
</h1>
<p>
in this agrument give a css width like vh,px,pc etc. this will be the width of your model box use null for
defalt
</p>
<h1>
heigth
</h1>
<p>
in this agrument give a css heigth like vh,px,pc etc. this will be the heigth of your model box use null for
defalt
</p>
<h1>
close button text
</h1>
<p>
in this agrument the give text will be use to close button use null to put i as "x"
</p>
<h1>
background color
</h1>
<p>
in this agrument the give a css color hex rgb css color to put as background color use null to put i as
"white"
</p>
<h1>
text color
</h1>
<p>
in this agrument the give a css color hex rgb css color to put as background color use null to put i as
"white"
</p>
</section>
<hr>
<section class="main-section" id="ls">
<h1>
localstorage
</h1>
<p>
easy.js give alternative of localstorage comands
</p>
<h1>
ls()
</h1>
<p>
this will retrun the localstorage ls()
<code>
ls()
<span class="code">//try this in console</span>
</code>
</p>
<h1>
ls_s()
</h1>
<p>
this is used to set somthing in localstorage use ls_s(id, value) this will also retrun a item id set
<code>
ls_s("cooltext", "hey i set this in localstorage using easy.js")
<span class="code">//try this in console</span>
</code>
</p>
<h1>
ls_g()
</h1>
<p>
this is used to get somthing from localstorage use ls_g(id) this will retrun the item
<code>
ls_g("cooltext")
<span class="code">//try this in console</span>
</code>
</p>
<h1>
ls_c()
</h1>
<p>
this is used to clear the localstorage ls_c()
<code>
ls_c()
<span class="code">//try this in console</span>
</code>
</p>
<h1>
ls_r()
</h1>
<p>
this is used to remove a item from localstorage with that id
<code>
ls_c("cooltext")
<span class="code">//try this in console</span>
</code>
</p>
</section>
<hr>
<section class="main-section" id="show-hide">
<h1>
show and hide
</h1>
<h1>
show()
</h1>
<p>use this to show a element from a display none to disply block<br>
use show(".classname") to use a class or use show("#id") to use id
</p>
<code id="element">
show("#cool")
<span id="cool" style="display:none">seen now</span>
<span class="code">//try this in console</span>
</code>
<h1>
hide()
</h1>
<p>use this to hide a element from a display anything to disply none<br>
use hide(".classname") to use a class (first element with that class name) or use hide("#id") to use id
</p>
<code id="element">
hide("#elearn")
<span id="elearn" style="display:none">hide me</span>
<span class="code">//try this in console</span>
</code>
</section>
<hr>
<section class="main-section" id="code-tag">
<h1>
<code-tag>
</h1>
<p>
use this to show a code element in html<br>
example <code-tag>show()</code-tag>
</p>
<code id="element">
<code-tag>code</code-tag>
</code>
</section>
<hr>
<section class="main-section" id="comment-tag">
<h1>
<comment-tag>
</h1>
<p>
use this to show a comment element in html<br>
</p>
</section>
<hr>
<section class="main-section" id="time-tag">
<h1>
<time-tag>
</h1>
<p>
use this to show the time in format dd/mm/yyyy in html<br>
example <time-tag></time-tag>
</p>
</section>
<hr>
<section class="main-section" id="link">
<h1>
link()
</h1>
<p>
use this to open a link in a new tab
</p>
</section>
<hr>
<section class="main-section" id="notify">
<h1>
notify()
</h1>
<p>
use this to notify the user with a notification using the push notification api
</p>
</section>
<script src="./easy.js"></script>
</main>