/piglatinify

jQuery plugin to rewrite text in Pig Latin

Primary LanguageJavaScriptMIT LicenseMIT

Piglatinify

This is a simple jQuery plug-in that converts the text of any DOM element into pig latin. It also converts the text inside child elements and will retain all HTML formatting.

To use it, simply chain the function onto a jQuery DOM element. For example, if you have the following HTML ...

<div id="content"><b>The quick brown</b> fox jumps over 199 <i>lazy</i> dogs.</div>

... and you apply the following JavaScript ...

$( '#content' ).piglatinify();

... you will get ...

eThay uickqay ownbray oxfay umpsjay overay 199 azylay ogsday.