You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,24 +7,25 @@ It's like click, but when you don't click on your element.
7
7
```
8
8
bower install angular-off-click --save
9
9
```
10
+
or
11
+
```
12
+
npm install angular-off-click --save
13
+
14
+
10
15
```javascript
11
16
angular('yourAngularApp',['offClick']);
12
17
```
13
18
14
19
<h4>Usage/Example</h4>
15
20
Here we have a slide out navigation div that will appear when the user clicks a button. We want the div to go away when they click off of it (`off-click`). We also want to make sure the button that triggers the div to open, also does initial close it (`off-click-filter`).
The `off-click` attribute is the expression or function that will execute each time the user doesn't click on your element (or filter)<br />
24
-
The optional `off-click-filter` attribute is a comma separated list of selectors that will not trigger `off-click` when they are clicked.<br />
25
-
The optional `off-click-if` attribute is an expression that will determine if the `off-click` should trigger or not.
26
-
27
-
<h4>Other Features</h4>
28
-
Ability to choose elements outside of your element that will not trigger the `off-click` event.<br />
29
-
Ability to pass an expression to determine of the `off-click` event should trigger.
29
+
The optional `off-click-if` attribute is an expression that will determine if the `off-click` should trigger or not.<br/>
30
+
The optional `off-click-filter` directive allows you to pass a comma separated list of targets whose `off-click` will not be triggered when the element `off-click-filter` was applied to is clicked.
0 commit comments