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

https://github.com/saulsluz/jquery-prevent

Simple toggle element to change the normal state of a element to a push state and vice versa
https://github.com/saulsluz/jquery-prevent

jquery-plugin toggle-buttons

Last synced: 4 months ago
JSON representation

Simple toggle element to change the normal state of a element to a push state and vice versa

Awesome Lists containing this project

README

          

# jquery-prevent
Simple toggle element to change the normal state of a button to a push state and vice versa

## Usage

To change to a push state
```javascript
$('#element').prevent('store').prevent('block')
```

To change to a push normal
```javascript
$('#element').prevent('restore')
```

To change to a push normal and set an attribute
```javascript
$('#element').prevent('restore', e => e.val(someValue))
```

## Test