v-togg
Vue UI directive. Toggle classes, attributes, properties.
Usage
Attributes
v-togg
: vue entry point (must accompanytogg-event
)togg-event
: event(s) to listen totogg-scope
: applicable scopetogg-class
: classes to toggle when event occurstogg-attr
: attribute to toggle when event occurstogg-prop
: property to toggle when event occurstogg-state
: force statetrue
orfalse
from event targettogg-trigger
additional events to trigger when event occurstogg-method
: jQuery method to invoke when event occurs
Setup
npm install v-togg
npm install v-togg --save
require
the directive
Vue
instance
Create el: '#your-app'