Skip to content

Commit 0c40f12

Browse files
committed
Bump to version 0.0.17
1 parent c760fbc commit 0c40f12

File tree

6 files changed

+39
-17
lines changed

6 files changed

+39
-17
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Vextension-Web is a fast javascript framework to manage browser actions
2424
#### Import via jsdelivr
2525

2626
```html
27-
<script src="https://cdn.jsdelivr.net/npm/vextension-web@0.0.16/dist/vextension-web.min.js"></script>
27+
<script src="https://cdn.jsdelivr.net/npm/vextension-web@0.0.17/dist/vextension-web.min.js"></script>
2828
```
2929

3030
### Import as Module
@@ -66,8 +66,8 @@ $(document).ready(() => {
6666
// ===============================================================================
6767

6868
// hide and show elements
69-
$('.text').show('block'); // sets css property display: block;
70-
$('.text').hide(); // sets css property display: none;
69+
$('.text').show(/*optional*/ timeout, /*optional*/ 'block'); // sets css property display: block;
70+
$('.text').hide(/*optional*/ timeout); // sets css property display: none;
7171

7272
// manage styling
7373
$('.text').css('background', '#222');
@@ -96,6 +96,16 @@ $(document).ready(() => {
9696
$('.text').get(0);
9797
$('.text').array(); // returns an array with Elements [ekement, element]
9898

99+
// wait function
100+
$('.text')
101+
.wait(2000)
102+
.then((textElementCollection) => {
103+
console.log('Waited for 2000ms');
104+
});
105+
106+
$('.text').find('a'); // returns an ElementCollection with all a elemts inside of all .text classified elements
107+
$('.text').find('div'); // returns all divs ElementCollection insite .text
108+
99109
// adding and removing classes from an alement
100110
$('.text').addClass('testclass');
101111
$('.text').removeClass('testclass');

dist/vextension-web.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Vextension-Web v0.0.16 | Copyright (C) 2021 | vironlab.eu
2+
* Vextension-Web v0.0.17 | Copyright (C) 2021 | vironlab.eu
33
* Licensed under the MIT License
44
*
55
* ___ _______ ______ ______
@@ -266,12 +266,18 @@ class VextensionElementCollection extends Array {
266266
return this;
267267
}
268268

269-
hide() {
270-
return this.show('none');
269+
hide(timeout = 0) {
270+
setTimeout(() => {
271+
this.show(timeout, 'none');
272+
}, timeout);
273+
return this;
271274
}
272275

273-
show(display = 'block') {
274-
return this.css('display', display);
276+
show(timeout = 0, display = 'block') {
277+
setTimeout(() => {
278+
this.css('display', display);
279+
}, timeout);
280+
return this;
275281
}
276282

277283
select() {
@@ -388,7 +394,7 @@ vextension = (...params) => {
388394
vextension.locationName = vextension.pathName = window.location.pathname;
389395
vextension.hostname = window.location.hostname;
390396
vextension.url = window.location.href;
391-
vextension.version = '0.0.16';
397+
vextension.version = '0.0.17';
392398
// =================================== variables =================================== //
393399

394400
// =================================== utility =================================== //

dist/vextension-web.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)