Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blivesta/chaffle
Shuffle Characters Randomly.
https://github.com/blivesta/chaffle
Last synced: 7 days ago
JSON representation
Shuffle Characters Randomly.
- Host: GitHub
- URL: https://github.com/blivesta/chaffle
- Owner: blivesta
- Created: 2014-05-11T04:24:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-12-05T03:22:11.000Z (about 2 years ago)
- Last Synced: 2024-04-17T00:21:40.082Z (9 months ago)
- Language: JavaScript
- Homepage: http://git.blivesta.com/chaffle
- Size: 1.15 MB
- Stars: 222
- Watchers: 16
- Forks: 40
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Chaffle
[![npm version](https://img.shields.io/npm/v/chaffle.svg?style=flat-square)](https://www.npmjs.com/package/chaffle)
[![Build Status](https://img.shields.io/travis/blivesta/chaffle/master.svg?style=flat-square)](https://travis-ci.org/blivesta/chaffle)Shuffle Characters Randomly.
## Demo
http://git.blivesta.com/chaffle/
## Install
```html
```
npm
```html
$ npm install chaffle
```## Usage
### Markup
```html
English
日本語
ひらがな
カタカナ
Українська
中文
Data options
```### Call the Chaffle
```js
const elements = document.querySelectorAll("[data-chaffle]");
Array.prototype.forEach.call(elements, function(el) {
const chaffle = new Chaffle(el, {
/* options */
});
chaffle.init();
});
```e.g: mouseover
```js
import Chaffle from "chaffle";const elements = document.querySelectorAll("[data-chaffle]");
Array.prototype.forEach.call(elements, function(el) {
const chaffle = new Chaffle(el, {
/* options */
});
el.addEventListener("mouseover", function() {
chaffle.init();
});
});
```## Options
```html
Data options
```OR
```js
var chaffle = new Chaffle(el, {
lang: "en", // default: 'en'
// 'en' || 'ja' || 'ja-hiragana' || 'ja-katakana' || 'ua' || 'cn'
speed: 20, // default: 20
delay: 100 // default: 100
});
```## License
Released under the MIT license.