manhattan-field-filled
v1.0.2
Published
Dispatch a 'filled' and 'empty' event against text inputs, selects and textareas whenever the field is filled or emptied.
Downloads
11
Readme
Installation
npm install manhattan-field-filled --save-dev
Usage
import * as $ from 'manhattan-essentials'
import {addFilled} from 'manhattan-field-filled'
$.listen(
$.one('.some-input'),
{
'empty': (ev) => {
this.classList.add('empty')
},
'filled': (ev) => {
this.classList.add('filled')
}
}
)
addFilled()