Giter Club home page Giter Club logo

hoygan's Introduction

hoygan

JQuery's HOYGAN plugin

This is a plugin for translating text to HOYGAN.

For more information about the HOYGAN language, check out this sources:

Requirements

The HOYGAN plugin requires the jQuery library already loaded.

Usage:

Once loaded in an HTML pade, the HOYGAN plugin can be used on arbitrary strings, in three different ways:

  • Translating a string, as the plugin also extends the String object.

Example:

"this is a string".hoygan();
  • Calling a function with a String as first parameter.

This is the original way of calling hoygan.

var result = $.hoygan("this is a string");

It also takes a second optional boolean parameter, indicating if the process will be randomized (given every time a different result) or deterministic (using the same logic, but with the string's properties instead of random generated numbers); true" for random, false for deterministic (default true).

var result = $.hoygan("this is a string", false);

This last funcionality is useful when it's intended to see the same output in different moments without losing the original text.

  • Applying hoygan to a collection of HTML DOM nodes.

The plugin has an extension to jQuery object, wich is a collection of elements. When used this way, the plugin applies hoygan to the text and value of every object in the collection.

var result = $("div.to-be-translated-to-hoygan").hoygan();

Demo

There's a demo.html file in the project root folder, that you can use to see it in live action. Just download the project and see the demo.html file in any javascript-enabled web browser.

hoygan's People

Contributors

canta avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

2947721120

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.