Sha256: 1b937e19d0f9309a935e30a5cc8761077a1beb294734af6db56ba7539d7cdf21
Contents?: true
Size: 405 Bytes
Versions: 8
Compression:
Stored size: 405 Bytes
Contents
namespace 'styleus.toggle', (exports) -> config = exports.config = toggleSelector: 'toggle' exports.install = (root) -> $root = $(root or document) $root.on 'click', "[data-#{config.toggleSelector}]", (event) -> event.preventDefault() link = $(event.target) target = $root.find(link.data(config.toggleSelector)) target.toggleClass('enabled') if target false
Version data entries
8 entries across 8 versions & 1 rubygems