deleted
Deleted provides a slightly different experience for hard deletes. Clicking a delete button creates a dropdown with a confirmation and cancel button. This requires two click actions from the user, helping to prevent accidental deletions.
It's dependency-free and delightfully lightweight:
deleted.min.js 711 B (gzipped)
deleted.min.css 490 B (gzipped)
See it in action: http://johnotander.com/deleted.
Installation
npm install --save deleted
Or with git
git clone https://github.com/johnotander/deleted.git
Usage
Link the javascript and CSS files:
<!-- ... --> <!-- ... --> <!-- ... -->
Then, you can use deleted with the following link and data attributes:
Delete
A custom example
Custom Delete
License
MIT
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Crafted with <3 by John Otander (@4lpine).