AcroGrow.js
A jQuery plug-in that makes (non)sense of internet acronyms.
Â
Features
- Replaces acronyms within specified elements with random nonsense words OR actual definitions.
- Define custom acronyms list & associated definitions.
- Separate name-spaced CSS file for easy customization & debugging.
Â
Getting Started
- Include the AcroGrow CSS
- Include jQuery
- Include acrogrow.randomWords.js (optional)
- Include acrogrow.js
- Call acroGrow() when the document is ready
For example:
Head area of document
<link rel="stylesheet" href="path/to/jQuery.AcroGrow.css">
Body area of document
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="path/to/jQuery.AcroGrow.js"></script> <script> $(document).ready(function() { $('.foo').acroGrow(); }); </script>
To see more examples of usage, visit the project page.
Â
How it Works
AcroGrow evaluates each specified element and wraps each acronym match in a <span class="ag-swap">
…</span>
. After the initial identification stage, the wrapped matches are either replaced with their proper definitions, or dynamically replaced with randomly generated replacements depending on the options set.
Â