An open API service indexing awesome lists of open source software.

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

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
```