Skip to content

Rails-Designer/attractivejs

Repository files navigation

Note

Attractive.js 1.0.0 is in the works. Have your say: https://github.com/Rails-Designer/attractivejs/milestone/2

Attractive.js

A light-weight library for declarative DOM actions using data attributes.

Quick example:

<button data-action="toggleClass#active" data-target="content">Toggle</button>

<p id="content">This element should toggle the `active` class.</p>

There are many more actions, like: addAttribute, copy (to clipboard), addElement and removeElement.

Sponsored By Rails Designer

Rails Designer

Documentation

📑 See documentation (built with Perron)

Release

npm run release  # patch bump (0.12.x → 0.12.y)
npm run release -- minor  # minor bump (0.12.x → 0.13.0)
npm run release -- major  # major bump (0.12.x → 1.0.0)

# Pre-release (alpha)
npm run release -- premajor --preid alpha  # 0.12.x → 1.0.0-alpha.0
npm run release -- prerelease --preid alpha # 1.0.0-alpha.0 → 1.0.0-alpha.1

License

Attractive.js is released under the MIT License.

About

A light-weight library for declarative DOM actions using data attributes

Topics

Resources

License

Stars

49 stars

Watchers

1 watching

Forks

Contributors

Languages