html-toggle
Simple toggling library for HTML, based on data attributes.
Uses jquery.
Help
Unfortunately I don't have any more time to maintain this repository :-(
Don't you want to save me and this project by taking over it?
Installation
install for commonJS environments (for example simq):
$ npm install html-toggle
or download standalone version:
Usage
<script type="text/javascript">
$(function() {
// var Toggle = require('html-toggle'); // only for commonJS
Toggle(jQuery);
});
</script>
<a href="#" data-toggle data-toggle=".languages">Show or hide all languages</a>
<ul class="languages">
...
</ul>
Hide link after first toggle
data-hide-toggler
<a href="#" data-toggle data-hide-toggler data-toggle=".languages">Show all languages</a>
Specifying fire event
data-event
<a href="#" data-toggle data-event="mouseover" data-toggle=".languages">Show all languages</a>
Tests
$ npm test
Changelog
-
1.0.1
- Move under Carrooi organization
- Abandon package
-
1.0.0
- Initial version