0.6.0 • Published 7 years ago

v-togg v0.6.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

v-togg

Vue UI directive. Toggle classes, attributes, properties.

Usage

View interactive examples

Attributes

  • v-togg: vue entry point (must accompany togg-event)
  • togg-event: event(s) to listen to
  • togg-scope: applicable scope
  • togg-class: classes to toggle when event occurs
  • togg-attr: attribute to toggle when event occurs
  • togg-prop: property to toggle when event occurs
  • togg-state: force state true or false from event target
  • togg-trigger additional events to trigger when event occurs
  • togg-method: jQuery method to invoke when event occurs

Setup

npm install v-togg

npm install v-togg --save

require the directive

require('v-togg')

Create Vue instance

new Vue({
  el: '#your-app'
})

Related

Also available as an Angular directive