7.0.1 • Published 7 years ago

@kt3k/puncher v7.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

puncher v7.0.1

Punching characters and images.

Note This library depends on jquery, class-component and cc-event.

Usage

<script src="path/to/jquery.js"></script>
<script src="path/to/class-component.js"></script>
<script src="path/to/cc-event.js"></script>
<script src="path/to/puncher.js"></script>

<div class="puncher" unit-dur="120">Hello, world! <img src="foo.png" /></div>

This prints Hello, world! letter by letter and the image "foo.png". Each letter displays with 120ms delay from the previous letter. This timing is configurable with the unit-dur attributes of the above example. The image tag (or any other tag) counts as a single character.

Via npm

In command line:

npm install jquery class-component cc-event @kt3k/puncher

In script:

global.jQuery = require('jquery')
require('class-component')
require('cc-event')
require('@kt3k/puncher')

In html:

<div class="puncher" unit-dur="120">Hello, world! <img src="foo.png" /></div>

This prints Hello, world! letter by letter and the image "foo.png". Each letter displays with 120ms delay from the previous letter. This timing is configurable with the unit-dur attributes of the above example. The image tag (or any other tag) counts as a single character.

API Reference

<dic class="puncher" unit-dur="120"></div>

Attributes

unit-dur

unit-dur means the unit duration of punching of characters.

Events

event 'puncher.start'

When this event is triggered on the element, the punching starts.

event 'puncher.started'

This event is triggered when the punching starts.

event 'puncher.ended'

This event is triggered when the punching ends.

event 'puncher.appended'

This event is triggered on the appended element when it's appended.

LICENSE

MIT

7.0.1

7 years ago

7.0.0

7 years ago

6.0.0

7 years ago

5.1.0

8 years ago

5.0.0

8 years ago

4.0.0

8 years ago

3.0.0

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago