html-toggle

1.0.1 • Public • Published

NPM version Dependency Status Build Status

Donate

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?

sad cat

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

Readme

Keywords

Package Sidebar

Install

npm i html-toggle

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • sakren