Skip to content

Its like click, but when you don't click on your element.

Notifications You must be signed in to change notification settings

brutto/angular-off-click

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

angular-off-click

It's like click, but when you don't click on your element.

Installing

``` bower install angular-off-click --save ``` ```javascript angular('yourAngularApp',['offClick']); ```

Usage/Example

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`). ```html Show Navigation
...
```

The off-click attribute is the expression or function that will execute each time the user doesn't click on your element (or filter)
The optional off-click-filter attribute is a comma separated list of selectors that will not trigger off-click when they are clicked.
The optional off-click-if attribute is an expression that will determine if the off-click should trigger or not.

Other Features

Ability to choose elements outside of your element that will not trigger the `off-click` event.
Ability to pass an expression to determine of the `off-click` event should trigger.

About

Its like click, but when you don't click on your element.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%