Skip to content

Commit 2284554

Browse files
committed
j-FloatingBox, update hiding a box after clicking on it
1 parent c126aa5 commit 2284554

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

j-FloatingBox/component.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ COMPONENT('floatingbox', 'zindex:10', function(self, config, cls) {
192192
});
193193
});
194194

195+
if (opt.autohide)
196+
opt.box.on('click', self.hide);
197+
195198
opt.autofocus && self.autofocus(opt.autofocus);
196199
is = true;
197200

j-FloatingBox/component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"datecreated": "2021-09-29T09:09:00.000Z",
3-
"dateupdated": "2023-03-14T12:34:00.000Z",
3+
"dateupdated": "2023-03-14T13:08:00.000Z",
44
"name": "j-FloatingBox",
55
"tags": [
66
"forms"

j-FloatingBox/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ __Methods__:
2525
- `opt.autofocus {Boolean}` tries to focus first input/textarea
2626
- `opt.hide {String}` a link to the method `function(box_element)`
2727
- `opt.show {String}` a link to the method `function(box_element)`
28+
- `opt.autohide {Boolean}` enables hiding a box after clicking on it
2829
- `opt.delay {Number}` a simple delay for rendering (default: `0`)
2930
- `opt.scrolltop {Boolean}` it deducts scroll top position from the current offset Y (default: `false`)
3031
- `opt.url {String}` optional, URL address for the content

0 commit comments

Comments
 (0)