Skip to content
This repository was archived by the owner on Apr 5, 2020. It is now read-only.
xurion edited this page Feb 24, 2013 · 2 revisions

Acronymizer.js is a native JavaScript class that wraps pattern-matched text in HTML with an element (acronym by default). This solves the issue of directly modifying the innerHTML of an element and unbinding any events that have been bound.

Example

This example shows a simple way to wrap all occurrences of the text "CSS" and wrap it.

window.onload = function () {
    var body = document.body,
        acron = new Acronymizer({
            element: body,
            pattern: 'CSS'
        });
    acron.go();
};

See examples for more advanced uses.

Index

Installation

Clone this wiki locally