https://github.com/ubermanu/furtive
👁️ jQuery plugin that toggles visibility of HTML elements according to form input values
https://github.com/ubermanu/furtive
conditional form-element jquery jquery-plugin reveal
Last synced: 9 months ago
JSON representation
👁️ jQuery plugin that toggles visibility of HTML elements according to form input values
- Host: GitHub
- URL: https://github.com/ubermanu/furtive
- Owner: ubermanu
- License: mit
- Created: 2018-02-15T14:25:52.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2023-01-27T17:59:03.000Z (about 3 years ago)
- Last Synced: 2025-06-08T21:59:12.333Z (10 months ago)
- Topics: conditional, form-element, jquery, jquery-plugin, reveal
- Language: JavaScript
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jQuery - Furtive
A plugin that toggles visibility of HTML elements according to Form input values.
### Getting started
Once you've included **furtive.js** and **jQuery** to your page, you can attach the Furtive watcher to a container.
All the form elements (input, select, textarea etc...) will trigger the watcher handler.
```html
```
### Conditions
Then, in your container you can attach some conditions to other elements.
The conditions are simple jQuery selectors.
If one of the selector matches, the condition is fulfilled and the element is displayed.
**Note:** The selectors must be in the main watcher scope, see above.
```html
```
> This example will show the <div> element if #input is checked
### Conjunction
Sometimes it's necessary to have multiple conditions that MUST match.
It's possible to define the conjunction method between conditions.
The **OR** conjunction is used by default.
```html
```
> This example will show the <div> element if #input is checked and #input2 is checked too.
### Options
Disable the auto-binding at start:
```js
window.Furtive.autoBind = false
```
Keep form elements enabled when hidden:
```js
window.Furtive.disableHidden = false
```